From 87998138bfbf942e12c8b415e33adc7015201b22 Mon Sep 17 00:00:00 2001 From: Billy Walker Date: Thu, 20 Jan 2022 16:53:00 +0000 Subject: [PATCH 1/2] fix: adding annotations to the controller service account --- charts/ingress-nginx/README.md | 1 + charts/ingress-nginx/templates/controller-serviceaccount.yaml | 4 ++++ charts/ingress-nginx/values.yaml | 1 + 3 files changed, 6 insertions(+) diff --git a/charts/ingress-nginx/README.md b/charts/ingress-nginx/README.md index 32dfd36e2e..15536a79eb 100644 --- a/charts/ingress-nginx/README.md +++ b/charts/ingress-nginx/README.md @@ -473,6 +473,7 @@ Kubernetes: `>=1.19.0-0` | rbac.create | bool | `true` | | | rbac.scope | bool | `false` | | | revisionHistoryLimit | int | `10` | Rollback limit | +| serviceAccount.annotations | object | `{}` | Annotations for the controller service account | | serviceAccount.automountServiceAccountToken | bool | `true` | | | serviceAccount.create | bool | `true` | | | serviceAccount.name | string | `""` | | diff --git a/charts/ingress-nginx/templates/controller-serviceaccount.yaml b/charts/ingress-nginx/templates/controller-serviceaccount.yaml index a4d7db5d24..e31819f7c9 100644 --- a/charts/ingress-nginx/templates/controller-serviceaccount.yaml +++ b/charts/ingress-nginx/templates/controller-serviceaccount.yaml @@ -10,5 +10,9 @@ metadata: {{- end }} name: {{ template "ingress-nginx.serviceAccountName" . }} namespace: {{ .Release.Namespace }} + {{- if .Values.serviceAccount.annotations }} + annotations: + {{- toYaml .Values.serviceAccount.annotations | indent 4 }} + {{- end }} automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} {{- end }} diff --git a/charts/ingress-nginx/values.yaml b/charts/ingress-nginx/values.yaml index bddd1eb5c4..67144b0973 100644 --- a/charts/ingress-nginx/values.yaml +++ b/charts/ingress-nginx/values.yaml @@ -888,6 +888,7 @@ serviceAccount: create: true name: "" automountServiceAccountToken: true + annotations: {} # -- Optional array of imagePullSecrets containing private registry credentials ## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ From be59361e0d5e424efaba2b6a78c22afe86c1f036 Mon Sep 17 00:00:00 2001 From: Billy Walker Date: Thu, 20 Jan 2022 18:22:13 +0000 Subject: [PATCH 2/2] fix: adding annotations to the controller service account --- charts/ingress-nginx/templates/controller-serviceaccount.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/ingress-nginx/templates/controller-serviceaccount.yaml b/charts/ingress-nginx/templates/controller-serviceaccount.yaml index e31819f7c9..824b2a124e 100644 --- a/charts/ingress-nginx/templates/controller-serviceaccount.yaml +++ b/charts/ingress-nginx/templates/controller-serviceaccount.yaml @@ -12,7 +12,7 @@ metadata: namespace: {{ .Release.Namespace }} {{- if .Values.serviceAccount.annotations }} annotations: - {{- toYaml .Values.serviceAccount.annotations | indent 4 }} + {{ toYaml .Values.serviceAccount.annotations | indent 4 }} {{- end }} automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} {{- end }}