From 8718841bea448688aa50e4a24d3b8a1c11d59924 Mon Sep 17 00:00:00 2001 From: aistoica Date: Tue, 27 Aug 2024 13:38:07 +0300 Subject: [PATCH] Allow setting custom labels on mongo operator pod (#344) Co-authored-by: Andrei Stoica --- charts/atlas-operator/templates/deployment.yaml | 3 +++ charts/atlas-operator/values.yaml | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/charts/atlas-operator/templates/deployment.yaml b/charts/atlas-operator/templates/deployment.yaml index f2dd099a..95df3d49 100644 --- a/charts/atlas-operator/templates/deployment.yaml +++ b/charts/atlas-operator/templates/deployment.yaml @@ -17,6 +17,9 @@ spec: {{- end }} labels: {{- include "mongodb-atlas-operator.selectorLabels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: diff --git a/charts/atlas-operator/values.yaml b/charts/atlas-operator/values.yaml index 5fc87ae6..cd82d773 100644 --- a/charts/atlas-operator/values.yaml +++ b/charts/atlas-operator/values.yaml @@ -71,7 +71,8 @@ serviceAccount: # If not set and create is true, a name is generated using the fullname template name: "" -# podAnnotations can be defined to be set for the Operator Pod. +# podAnnotations and podLabels can be defined to be set for the Operator Pod. +podLabels: {} podAnnotations: {} # podSecurityContext sets the SecurityContext for the Operator Pod.