From 917dd4ad1da0bf8bfafbcdb7e54d9b4017eba8ce Mon Sep 17 00:00:00 2001 From: Kaj Fehlhaber Date: Tue, 10 Jun 2025 16:11:26 +0200 Subject: [PATCH 1/2] feat(nack): possibility to add custom pod labels fixes: #1012 --- helm/charts/nack/templates/deployment-jetstream-controller.yml | 1 + helm/charts/nack/values.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/helm/charts/nack/templates/deployment-jetstream-controller.yml b/helm/charts/nack/templates/deployment-jetstream-controller.yml index 666ed43d..c91b7be9 100644 --- a/helm/charts/nack/templates/deployment-jetstream-controller.yml +++ b/helm/charts/nack/templates/deployment-jetstream-controller.yml @@ -25,6 +25,7 @@ spec: labels: app: {{ template "jsc.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + {{- toYaml .Values.podLabels | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: diff --git a/helm/charts/nack/values.yaml b/helm/charts/nack/values.yaml index b22ef0c9..5b0cf8ac 100644 --- a/helm/charts/nack/values.yaml +++ b/helm/charts/nack/values.yaml @@ -117,6 +117,7 @@ rbacRules: | - update - delete +podLabels: {} podAnnotations: {} # Toggle whether to use setup a Pod Security Context From 9c7ead8e438d80b2ebf317032ac7a06919040241 Mon Sep 17 00:00:00 2001 From: Kaj Fehlhaber Date: Tue, 10 Jun 2025 16:14:56 +0200 Subject: [PATCH 2/2] fix: make sure dict is populated before adding labels --- helm/charts/nack/templates/deployment-jetstream-controller.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helm/charts/nack/templates/deployment-jetstream-controller.yml b/helm/charts/nack/templates/deployment-jetstream-controller.yml index c91b7be9..9baef674 100644 --- a/helm/charts/nack/templates/deployment-jetstream-controller.yml +++ b/helm/charts/nack/templates/deployment-jetstream-controller.yml @@ -25,7 +25,9 @@ spec: labels: app: {{ template "jsc.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + {{- if .Values.podLabels }} {{- toYaml .Values.podLabels | nindent 8 }} + {{- end }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: