Skip to content

Commit

Permalink
Merge pull request kubernetes#7072 from Kellen275/kgsappington/servic…
Browse files Browse the repository at this point in the history
…emonitor-annotations

Only render ServiceMonitor annotations if not empty
  • Loading branch information
k8s-ci-robot authored Sep 30, 2024
2 parents 8fc7566 + dfb30e6 commit f79e8d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/cluster-autoscaler/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ name: cluster-autoscaler
sources:
- https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler
type: application
version: 9.42.0
version: 9.43.0
2 changes: 2 additions & 0 deletions charts/cluster-autoscaler/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ metadata:
{{- if .Values.serviceMonitor.namespace }}
namespace: {{ .Values.serviceMonitor.namespace }}
{{- end }}
{{- if .Values.serviceMonitor.annotations }}
annotations:
{{ toYaml .Values.serviceMonitor.annotations | indent 4 }}
{{- end }}
labels:
{{- range $key, $value := .Values.serviceMonitor.selector }}
{{ $key }}: {{ $value | quote }}
Expand Down

0 comments on commit f79e8d4

Please sign in to comment.