From 9c1de7ef70da3ef462a620a09c6b28685747961a Mon Sep 17 00:00:00 2001 From: Arie Peterson Date: Thu, 12 Jan 2023 11:22:59 +0100 Subject: [PATCH] Add podLabels --- charts/common/templates/_daemonset.tpl | 3 +++ charts/common/templates/_deployment.tpl | 3 +++ charts/common/templates/_statefulset.tpl | 3 +++ charts/common/values.schema.json | 7 +++++++ charts/common/values.yaml | 3 +++ 5 files changed, 19 insertions(+) diff --git a/charts/common/templates/_daemonset.tpl b/charts/common/templates/_daemonset.tpl index 035f1b66..acf4df52 100644 --- a/charts/common/templates/_daemonset.tpl +++ b/charts/common/templates/_daemonset.tpl @@ -28,6 +28,9 @@ spec: {{- end }} labels: {{- include "common.labels.selectorLabels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: diff --git a/charts/common/templates/_deployment.tpl b/charts/common/templates/_deployment.tpl index 0a695e0a..dc5786f3 100644 --- a/charts/common/templates/_deployment.tpl +++ b/charts/common/templates/_deployment.tpl @@ -33,6 +33,9 @@ spec: {{- end }} labels: {{- include "common.labels.selectorLabels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: diff --git a/charts/common/templates/_statefulset.tpl b/charts/common/templates/_statefulset.tpl index a692d408..38458dfb 100644 --- a/charts/common/templates/_statefulset.tpl +++ b/charts/common/templates/_statefulset.tpl @@ -34,6 +34,9 @@ spec: {{- end }} labels: {{- include "common.labels.selectorLabels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: diff --git a/charts/common/values.schema.json b/charts/common/values.schema.json index 9ec32d3d..8a22c256 100644 --- a/charts/common/values.schema.json +++ b/charts/common/values.schema.json @@ -121,6 +121,13 @@ "title": "Pod annotations", "type": "object" }, + "podLabels": { + "$id": "#/properties/podLabels", + "default": {}, + "description": "An explanation about the purpose of this instance.", + "title": "Pod labels", + "type": "object" + }, "serviceAccount": { "$id": "#/properties/serviceAccount", "description": "An explanation about the purpose of this instance.", diff --git a/charts/common/values.yaml b/charts/common/values.yaml index 6b56792d..fc7a9215 100644 --- a/charts/common/values.yaml +++ b/charts/common/values.yaml @@ -71,6 +71,9 @@ podAnnotations: {} ## useful if you enable diun.watch_repo # exclude_tags: "" +# Set labels on the pod +podLabels: {} + serviceAccount: # Specifies whether a service account should be created create: false