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

Adds additional labels option for ServiceMonitor #757

Merged
merged 3 commits into from
Jan 6, 2021

Conversation

zjhans
Copy link
Collaborator

@zjhans zjhans commented Dec 10, 2020

fixes #742

@@ -8,6 +8,9 @@ metadata:
app: {{ template "kuberhealthy.name" . }}
prometheus: {{ .Values.prometheus.name }}
release: {{ .Values.prometheus.release }}
{{- if .Values.prometheus.serviceMonitor.additionalLabels}}
additionalLabels: {{ .Values.prometheus.serviceMonitor.additionalLabels}}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry just thought of this, but with list values, i think there needs to be some extra configuration to make sure you get add every individual item... something like:

        {{- if .Values.deployment.args }}
        args:
{{ toYaml .Values.deployment.args | nindent 8 }}
        {{- end }}

https://github.com/Comcast/kuberhealthy/blob/master/deploy/helm/kuberhealthy/templates/deployment.yaml#L44-L47

@joshulyne joshulyne merged commit 9252bfa into master Jan 6, 2021
@joshulyne joshulyne deleted the service-monitor-custom-labels branch January 6, 2021 17:43
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.

ServiceMonitor should allow specifying custom labels so that prometheus-operator can discover them
2 participants