From 966670fe70e54a2f37241e63541147e7fa46d89e Mon Sep 17 00:00:00 2001 From: Arie Peterson Date: Tue, 5 Oct 2021 11:36:24 +0200 Subject: [PATCH] Allow setting custom kubernetes labels when using the helm chart --- helm/wekan/templates/deployment.yaml | 6 ++++++ helm/wekan/values.yaml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/helm/wekan/templates/deployment.yaml b/helm/wekan/templates/deployment.yaml index c7f192f1e..1f2834ea5 100644 --- a/helm/wekan/templates/deployment.yaml +++ b/helm/wekan/templates/deployment.yaml @@ -8,6 +8,9 @@ metadata: component: wekan release: {{ .Release.Name }} heritage: {{ .Release.Service }} + {{- if .Values.deploymentLabels }} + {{- toYaml .Values.deploymentLabels | nindent 4 }} + {{- end }} spec: replicas: {{ .Values.replicaCount }} selector: @@ -22,6 +25,9 @@ spec: app: {{ template "wekan.name" . }} component: wekan release: {{ .Release.Name }} + {{- if .Values.podLabels }} + {{- toYaml .Values.podLabels | nindent 8 }} + {{- end }} spec: serviceAccountName: {{ template "wekan.serviceAccountName" . }} containers: diff --git a/helm/wekan/values.yaml b/helm/wekan/values.yaml index 74fb01da7..9aab846c4 100644 --- a/helm/wekan/values.yaml +++ b/helm/wekan/values.yaml @@ -103,6 +103,12 @@ autoscaling: ## targetCPUUtilizationPercentage: 80 +# Optional custom labels for the deployment resource. +deploymentLabels: {} + +# Optional custom labels for the pods created by the deployment. +podLabels: {} + # ------------------------------------------------------------------------------ # MongoDB: # ------------------------------------------------------------------------------