From 0960e8b2cd18bd5acaea8b69ce188b60b049f658 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Fri, 5 Feb 2021 17:48:44 +0500 Subject: [PATCH] Allow specifying extra selector labels --- library/common/2101.0.0/templates/lib/chart/_labels.tpl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/common/2101.0.0/templates/lib/chart/_labels.tpl b/library/common/2101.0.0/templates/lib/chart/_labels.tpl index 7415a9daa00..f64aead636b 100644 --- a/library/common/2101.0.0/templates/lib/chart/_labels.tpl +++ b/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 }}