Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add service monitor #42

Closed
wants to merge 1 commit into from
Closed

add service monitor #42

wants to merge 1 commit into from

Conversation

batazor
Copy link
Contributor

@batazor batazor commented Jun 24, 2024

What type of PR is this?

Which issue does this PR fix:
close #41

What does this PR do / Why do we need it:

If an issue # is not available please add repro steps and logs showing the issue:

Testing done on this change:

Automation added to e2e:

Will this break upgrades or downgrades?

Does this PR introduce any user-facing change?:


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@rchincha
Copy link
Contributor

@batazor can you pls take a look at the CI failures?

@batazor
Copy link
Contributor Author

batazor commented Jun 26, 2024

@batazor can you pls take a look at the CI failures?

done

@rchincha
Copy link
Contributor

rchincha commented Jul 9, 2024

@batazor upgrade test failed as follows.

Get the application URL by running these commands:
export NODE_PORT=$(kubectl get --namespace zot-e817pun8up -o jsonpath="{.spec.ports[0].nodePort}" services zot-e817pun8up)
export NODE_IP=$(kubectl get nodes --namespace zot-e817pun8up -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
Error: UPGRADE FAILED: template: zot/templates/servicemonitor.yaml:1:18: executing "zot/templates/servicemonitor.yaml" at <.Values.metrics.enabled>: nil pointer evaluating interface {}.enabled

@batazor
Copy link
Contributor Author

batazor commented Jul 9, 2024

@rchincha Yes, I added support case handling when values.yaml was not set. Thanks!

charts/zot/Chart.yaml Outdated Show resolved Hide resolved
@batazor batazor closed this Jul 12, 2024
@batazor batazor reopened this Jul 12, 2024
@rchincha
Copy link
Contributor

@batazor Still fails.

 Get the application URL by running these commands:
  export NODE_PORT=$(kubectl get --namespace zot-ue4ohhrx84 -o jsonpath="{.spec.ports[0].nodePort}" services zot-ue4ohhrx84)
  export NODE_IP=$(kubectl get nodes --namespace zot-ue4ohhrx84 -o jsonpath="{.items[0].status.addresses[0].address}")
  echo http://$NODE_IP:$NODE_PORT
Error: UPGRADE FAILED: template: zot/templates/servicemonitor.yaml:1:34: executing "zot/templates/servicemonitor.yaml" at <.Values.metrics.enabled>: nil pointer evaluating interface {}.enabled
===================================

@batazor
Copy link
Contributor Author

batazor commented Jul 12, 2024

@rchincha Okay, one more try, added even more complete variable checking

@rchincha
Copy link
Contributor

@batazor

#43
^ had to pick whatever was approved and ready.
Your PR may require one more version bump.

@batazor batazor closed this Jul 15, 2024
Signed-off-by: Victor Login <[email protected]>
@batazor batazor reopened this Jul 15, 2024
@batazor
Copy link
Contributor Author

batazor commented Jul 15, 2024

@rchincha no problem

@batazor batazor closed this Jul 16, 2024
@rchincha
Copy link
Contributor

@batazor why close this PR?

@batazor
Copy link
Contributor Author

batazor commented Jul 23, 2024

I don't understand the problems that appear during testing, I haven't experienced such problems locally

@rchincha
Copy link
Contributor

rchincha commented Aug 1, 2024

@batazor

@Andreea-Lupu noted that:

{{- if and .Values.metrics .Values.metrics.enabled .Values.metrics.serviceMonitor .Values.metrics.serviceMonitor.enabled }}

replaced by (as multi-line) appears to fix this

{{- if .Values.metrics }}
{{- if .Values.metrics.enabled }}
{{- if .Values.metrics.serviceMonitor }}
{{- if .Values.metrics.serviceMonitor.enabled }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support prometheus-operator?
2 participants