diff --git a/charts/redisoperator/templates/_helpers.tpl b/charts/redisoperator/templates/_helpers.tpl index 180bcc4dd..6c8ea6799 100644 --- a/charts/redisoperator/templates/_helpers.tpl +++ b/charts/redisoperator/templates/_helpers.tpl @@ -45,8 +45,8 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/part-of: {{ include "chart.name" . }} -{{- range $k, $v := .Values.labels }} -{{ $k }}: {{ $v }} +{{- if .Values.labels}} +{{ toYaml .Values.labels }} {{- end }} {{- end -}}