-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
[prometheus-windows-exporter] Extract the prometheus.io/scrape service annotation #5132
Conversation
…aml file. Also add comments in the values.yaml file for the service section. All of these changes make this match how things look and work in the Node Exporter helm chart. Signed-off-by: Pete Wall <[email protected]>
Hi @petewall I understand this kind of issue and the PR how you try to resolve it. It works in context of this chart, but it wont work, if the chart is embedded as sub chart, like in k8s-monitoring-helm. There is a known helm issue, that removing the annotation via |
You're correct in that with Helm today, I can't "null" the value to remove it. But I can override it by setting this:
which will disable the annotation based scraping configurations for prometheus and other scrapers. Many aren't looking for the presence of the annotation, but checking that it is true. I'm doing that with Node Exporter: Which is setting the value to false: When Helm makes it so we can remove values in subcharts, then i'll go that route, but this is a workable solution for now. |
Please go ahead with |
As in, the values file remains: service:
annotations: {} And the service definition just applies those annotations? Would you keep the |
Good catch! Yeah, the unset can be cleaned up as well. If the end user explicit set |
Signed-off-by: Pete Wall <[email protected]>
…s not present anymore Signed-off-by: Pete Wall <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What this PR does / why we need it
This change moves the
prometheus.io/scrape
service annotation into the values.yaml file where it can be disabled if not desired.Also add comments in the values.yaml file for the service section.
All of these changes make this match how things look and work in the Node Exporter helm chart.
Which issue this PR fixes
prometheus.io/scrape
annotation on the service #5129Special notes for your reviewer
My testing to ensure that things behave correctly:
Checklist
[prometheus-couchdb-exporter]
)