-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[helm] Add support for relabelings and metricRelabelings at serviceMonitor #3366
Conversation
78d205f
to
82f8e04
Compare
@stevehipwell I would appreciate any feedback here. |
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.
I think it might be best to reduce the tight coupling with the ServiceMonitor
spec and provide a more flexible solution where we don't need to add all the fields into the values?
serviceMonitor:
enabled: false
namespace:
additionalLabels: {}
annotations: {}
targetLabels: []
endpointConfig:
interval: 1m
scrapeTimeout: 10s
Then if you wanted to template this you could use a string as so.
serviceMonitor:
enabled: false
namespace:
additionalLabels: {}
annotations: {}
targetLabels: []
endpointConfig: |-
interval: 1m
scrapeTimeout: 10s
metricRelabelings:
{{ .Values.test }}
I remove the tpl function. I do not have a use case for it rn, I copied it from prometheus helm chart. I can implement the I personally would prefer to follow the same pattern as other helm charts are doing this to keep a consistent chart experience |
@jkroepke I think the problem here is twofold. A lot of the well known Helm charts don't have much of a submission gate which results in completely incorrect implementations such as |
/lgtm |
Thanks @stevehipwell , I'm looking forward on this PR |
@Raffo could you approve this or do you want me to LGTM & approve these myself? |
@stevehipwell I can approve this one, but I have zero problem with you doing it. Feel free to own help related changes. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jkroepke, Raffo The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
I need to add some additional labels to all metrics.
Fixes #ISSUE
Checklist