From 86caa79c0f56639a33b4da7062404dbc4311c157 Mon Sep 17 00:00:00 2001 From: Ravi Singal <62086374+ravisingal@users.noreply.github.com> Date: Tue, 24 Sep 2024 22:52:24 +0530 Subject: [PATCH] chore: add common labels and annotations to pods (#98) --- helm/templates/job.yaml | 9 ++++++++- helm/values.yaml | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/helm/templates/job.yaml b/helm/templates/job.yaml index 74dc766..0b2f760 100644 --- a/helm/templates/job.yaml +++ b/helm/templates/job.yaml @@ -19,7 +19,14 @@ spec: metadata: labels: release: {{ .Release.Name }} - {{- with .Values.podLabels }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.commonPodLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.commonPodAnnotations }} + annotations: {{- toYaml . | nindent 8 }} {{- end }} spec: diff --git a/helm/values.yaml b/helm/values.yaml index 1605b35..8b19c66 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -47,6 +47,10 @@ jobLabels: podLabels: app: config-bootstrapper +commonPodLabels: {} + +commonPodAnnotations: {} + # The Deployment Selector match labels are different from the pod labels. Note that they should be a subset of the pod # labels. You append new labels to them but cannot remove labels. If you remove or modify the labels you will need to # delete the existing deployment bearing the same name and then redeploy. This is the reason why they are separated from