Procházet zdrojové kódy

Allow specifying extra selector labels

Waqar Ahmed před 4 roky
rodič
revize
0960e8b2cd

+ 5 - 0
library/common/2101.0.0/templates/lib/chart/_labels.tpl

@@ -16,4 +16,9 @@ Selector labels shared across objects.
 {{- define "common.labels.selectorLabels" -}}
 app.kubernetes.io/name: {{ include "common.names.name" . }}
 app.kubernetes.io/instance: {{ include "common.names.releaseName" . }}
+{{ if hasKey .Values "extraSelectorLabels" }}
+{{ range $selector := .Values.extraSelectorLabels }}
+{{ printf "%s: %s" $selector.key $selector.value }}
+{{ end }}
+{{ end }}
 {{- end }}