From 81027079d0377d69191bcb4731fa887a9898b7e1 Mon Sep 17 00:00:00 2001 From: kjeld Schouten-Lebbing Date: Mon, 22 Nov 2021 00:47:16 +0100 Subject: [PATCH] fix(common): also allow for templating in service selector --- charts/library/common/Chart.yaml | 2 +- charts/library/common/templates/classes/_service.tpl | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/charts/library/common/Chart.yaml b/charts/library/common/Chart.yaml index fdeeaba9eee..57ace40de17 100644 --- a/charts/library/common/Chart.yaml +++ b/charts/library/common/Chart.yaml @@ -15,4 +15,4 @@ maintainers: name: common sources: null type: library -version: 8.8.0 +version: 8.8.1 diff --git a/charts/library/common/templates/classes/_service.tpl b/charts/library/common/templates/classes/_service.tpl index 291584da7de..62c59d45105 100644 --- a/charts/library/common/templates/classes/_service.tpl +++ b/charts/library/common/templates/classes/_service.tpl @@ -95,7 +95,9 @@ spec: {{- if and ( ne $svcType "ExternalName" ) ( ne $svcType "ExternalIP" )}} selector: {{- if $values.selector }} - {{ toYaml $values.selector | indent 4 }} + {{- with $values.selector }} + {{- tpl (toYaml .) $ | nindent 4 }} + {{- end }} {{- else }} {{- include "common.labels.selectorLabels" . | nindent 4 }} {{- end }}