Skip to content

Commit

Permalink
Merge pull request #1383 from mrueg/custom-labels
Browse files Browse the repository at this point in the history
chart: Add custom labels to pdb and servicemonitor
  • Loading branch information
k8s-ci-robot authored Feb 11, 2021
2 parents 04f2249 + ad01c24 commit 329b6a7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/kube-state-metrics/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords:
- monitoring
- prometheus
- kubernetes
version: 2.12.1
version: 2.12.2
appVersion: 1.9.7
home: https://github.com/kubernetes/kube-state-metrics/
sources:
Expand Down
1 change: 1 addition & 0 deletions charts/kube-state-metrics/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ metadata:
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/managed-by: "{{ .Release.Service }}"
app.kubernetes.io/version: "{{ .Chart.AppVersion }}"
{{- if .Values.customLabels }}
{{ toYaml .Values.customLabels | indent 4 }}
{{- end }}
Expand Down
5 changes: 4 additions & 1 deletion charts/kube-state-metrics/templates/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ metadata:
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/managed-by: "{{ .Release.Service }}"
{{- if .Values.customLabels }}
{{ toYaml .Values.customLabels | indent 4 }}
{{- end }}
spec:
selector:
matchLabels:
app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
{{ toYaml .Values.podDisruptionBudget | indent 2 }}
{{- end -}}
{{- end -}}
3 changes: 3 additions & 0 deletions charts/kube-state-metrics/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ metadata:
{{- if .Values.prometheus.monitor.additionalLabels }}
{{ toYaml .Values.prometheus.monitor.additionalLabels | indent 4 }}
{{- end }}
{{- if .Values.customLabels }}
{{ toYaml .Values.customLabels | indent 4 }}
{{- end }}
spec:
selector:
matchLabels:
Expand Down

0 comments on commit 329b6a7

Please sign in to comment.