From 25d2def9b6e425aac5e075fbc164633259061f02 Mon Sep 17 00:00:00 2001 From: Tathagata Paul Date: Thu, 10 Mar 2022 15:16:53 +0530 Subject: [PATCH 1/3] support serviceAccount.Labels in Helm chart Signed-off-by: Tathagata Paul --- deploy/charts/cert-manager/templates/serviceaccount.yaml | 3 +++ deploy/charts/cert-manager/values.yaml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/deploy/charts/cert-manager/templates/serviceaccount.yaml b/deploy/charts/cert-manager/templates/serviceaccount.yaml index d549ea84d..6e53f784b 100644 --- a/deploy/charts/cert-manager/templates/serviceaccount.yaml +++ b/deploy/charts/cert-manager/templates/serviceaccount.yaml @@ -19,4 +19,7 @@ metadata: app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/component: "controller" {{- include "labels" . | nindent 4 }} + {{- with .Values.serviceAccount.labels }} + {{ toYaml . | nindent 4 }} + {{- end }} {{- end }} diff --git a/deploy/charts/cert-manager/values.yaml b/deploy/charts/cert-manager/values.yaml index 44a04db21..096bddf2d 100644 --- a/deploy/charts/cert-manager/values.yaml +++ b/deploy/charts/cert-manager/values.yaml @@ -81,6 +81,8 @@ serviceAccount: # Optional additional annotations to add to the controller's ServiceAccount # annotations: {} # Automount API credentials for a Service Account. + # Optional additional labels to add to the controller's ServiceAccount + # labels: {} automountServiceAccountToken: true # Additional command line flags to pass to cert-manager controller binary. From 67ed2ffd26d79fcaf5d8efb5379c8a160e70d4eb Mon Sep 17 00:00:00 2001 From: Tathagata Paul Date: Fri, 11 Mar 2022 22:00:25 +0530 Subject: [PATCH 2/3] added optional labels for webhook, startupapicheck and cainjector service accounts Signed-off-by: Tathagata Paul --- .../cert-manager/templates/cainjector-serviceaccount.yaml | 3 +++ .../templates/startupapicheck-serviceaccount.yaml | 3 +++ .../cert-manager/templates/webhook-serviceaccount.yaml | 3 +++ deploy/charts/cert-manager/values.yaml | 7 +++++++ 4 files changed, 16 insertions(+) diff --git a/deploy/charts/cert-manager/templates/cainjector-serviceaccount.yaml b/deploy/charts/cert-manager/templates/cainjector-serviceaccount.yaml index 683ec1d86..6457b9ef0 100644 --- a/deploy/charts/cert-manager/templates/cainjector-serviceaccount.yaml +++ b/deploy/charts/cert-manager/templates/cainjector-serviceaccount.yaml @@ -16,6 +16,9 @@ metadata: app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/component: "cainjector" {{- include "labels" . | nindent 4 }} + {{- with .Values.cainjector.serviceAccount.labels }} + {{ toYaml . | nindent 4 }} + {{- end }} {{- with .Values.global.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 2 }} diff --git a/deploy/charts/cert-manager/templates/startupapicheck-serviceaccount.yaml b/deploy/charts/cert-manager/templates/startupapicheck-serviceaccount.yaml index f63284054..46262d5d7 100644 --- a/deploy/charts/cert-manager/templates/startupapicheck-serviceaccount.yaml +++ b/deploy/charts/cert-manager/templates/startupapicheck-serviceaccount.yaml @@ -16,6 +16,9 @@ metadata: app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/component: "startupapicheck" {{- include "labels" . | nindent 4 }} + {{- with .Values.startupapicheck.serviceAccount.labels }} + {{ toYaml . | nindent 4 }} + {{- end }} {{- with .Values.global.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 2 }} diff --git a/deploy/charts/cert-manager/templates/webhook-serviceaccount.yaml b/deploy/charts/cert-manager/templates/webhook-serviceaccount.yaml index a08d2fc9d..2792a43a3 100644 --- a/deploy/charts/cert-manager/templates/webhook-serviceaccount.yaml +++ b/deploy/charts/cert-manager/templates/webhook-serviceaccount.yaml @@ -15,6 +15,9 @@ metadata: app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/component: "webhook" {{- include "labels" . | nindent 4 }} + {{- with .Values.webhook.serviceAccount.labels }} + {{ toYaml . | nindent 4 }} + {{- end }} {{- with .Values.global.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 2 }} diff --git a/deploy/charts/cert-manager/values.yaml b/deploy/charts/cert-manager/values.yaml index 096bddf2d..21c333a70 100644 --- a/deploy/charts/cert-manager/values.yaml +++ b/deploy/charts/cert-manager/values.yaml @@ -321,6 +321,8 @@ webhook: # name: "" # Optional additional annotations to add to the controller's ServiceAccount # annotations: {} + # Optional additional labels to add to the controller's ServiceAccount + # labels: {} # Automount API credentials for a Service Account. automountServiceAccountToken: true @@ -428,6 +430,8 @@ cainjector: # Optional additional annotations to add to the controller's ServiceAccount # annotations: {} # Automount API credentials for a Service Account. + # Optional additional labels to add to the controller's ServiceAccount + # labels: {} automountServiceAccountToken: true # This startupapicheck is a Helm post-install hook that waits for the webhook @@ -516,3 +520,6 @@ startupapicheck: # Automount API credentials for a Service Account. automountServiceAccountToken: true + + # Optional additional labels to add to the controller's ServiceAccount + # labels: {} From 7161870cea8c8a153be26e518468d513e0bb1f3e Mon Sep 17 00:00:00 2001 From: Tathagata Paul Date: Tue, 15 Mar 2022 17:42:47 +0530 Subject: [PATCH 3/3] minor commenting fixes Signed-off-by: Tathagata Paul --- deploy/charts/cert-manager/values.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/charts/cert-manager/values.yaml b/deploy/charts/cert-manager/values.yaml index 21c333a70..a771c5512 100644 --- a/deploy/charts/cert-manager/values.yaml +++ b/deploy/charts/cert-manager/values.yaml @@ -321,7 +321,7 @@ webhook: # name: "" # Optional additional annotations to add to the controller's ServiceAccount # annotations: {} - # Optional additional labels to add to the controller's ServiceAccount + # Optional additional labels to add to the webhook's ServiceAccount # labels: {} # Automount API credentials for a Service Account. automountServiceAccountToken: true @@ -430,7 +430,7 @@ cainjector: # Optional additional annotations to add to the controller's ServiceAccount # annotations: {} # Automount API credentials for a Service Account. - # Optional additional labels to add to the controller's ServiceAccount + # Optional additional labels to add to the cainjector's ServiceAccount # labels: {} automountServiceAccountToken: true @@ -521,5 +521,5 @@ startupapicheck: # Automount API credentials for a Service Account. automountServiceAccountToken: true - # Optional additional labels to add to the controller's ServiceAccount + # Optional additional labels to add to the startupapicheck's ServiceAccount # labels: {}