diff --git a/charts/metrics-server/templates/_helpers.tpl b/charts/metrics-server/templates/_helpers.tpl index 9b87f118f..41ab5cc04 100644 --- a/charts/metrics-server/templates/_helpers.tpl +++ b/charts/metrics-server/templates/_helpers.tpl @@ -53,6 +53,16 @@ app.kubernetes.io/name: {{ include "metrics-server.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} +{{/* +Pod labels +*/}} +{{- define "metrics-server.podLabels" -}} +{{ include "metrics-server.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +{{- end }} + {{/* Create the name of the service account to use */}} diff --git a/charts/metrics-server/templates/deployment.yaml b/charts/metrics-server/templates/deployment.yaml index d7535b876..61c438cb2 100644 --- a/charts/metrics-server/templates/deployment.yaml +++ b/charts/metrics-server/templates/deployment.yaml @@ -24,7 +24,7 @@ spec: template: metadata: labels: - {{- include "metrics-server.selectorLabels" . | nindent 8 }} + {{- include "metrics-server.podLabels" . | nindent 8 }} {{- with .Values.podLabels }} {{- toYaml . | nindent 8 }} {{- end }}