From 398c32e26c34a441f6496deba7dce3ff754be736 Mon Sep 17 00:00:00 2001 From: Ciara Stacke <18287516+ciarams87@users.noreply.github.com> Date: Thu, 15 Sep 2022 19:44:37 -0700 Subject: [PATCH] Cherry pick #3031 (#3046) adding automountServiceAccountToken to helm chart (#3031) Co-authored-by: Jason Williams --- deployments/common/ns-and-sa.yaml | 3 ++- deployments/daemon-set/nginx-ingress.yaml | 1 + deployments/daemon-set/nginx-plus-ingress.yaml | 1 + deployments/deployment/nginx-ingress.yaml | 1 + deployments/deployment/nginx-plus-ingress.yaml | 1 + deployments/helm-chart/templates/controller-daemonset.yaml | 1 + deployments/helm-chart/templates/controller-deployment.yaml | 1 + 7 files changed, 8 insertions(+), 1 deletion(-) diff --git a/deployments/common/ns-and-sa.yaml b/deployments/common/ns-and-sa.yaml index 994af5ae45..0bdee73511 100644 --- a/deployments/common/ns-and-sa.yaml +++ b/deployments/common/ns-and-sa.yaml @@ -7,4 +7,5 @@ apiVersion: v1 kind: ServiceAccount metadata: name: nginx-ingress - namespace: nginx-ingress \ No newline at end of file + namespace: nginx-ingress +#automountServiceAccountToken: false \ No newline at end of file diff --git a/deployments/daemon-set/nginx-ingress.yaml b/deployments/daemon-set/nginx-ingress.yaml index 7e79f03c02..d9f53a624f 100644 --- a/deployments/daemon-set/nginx-ingress.yaml +++ b/deployments/daemon-set/nginx-ingress.yaml @@ -17,6 +17,7 @@ spec: #prometheus.io/scheme: http spec: serviceAccountName: nginx-ingress + automountServiceAccountToken: true containers: - image: nginx/nginx-ingress:2.3.0 imagePullPolicy: IfNotPresent diff --git a/deployments/daemon-set/nginx-plus-ingress.yaml b/deployments/daemon-set/nginx-plus-ingress.yaml index b0bdca2a86..106e019417 100644 --- a/deployments/daemon-set/nginx-plus-ingress.yaml +++ b/deployments/daemon-set/nginx-plus-ingress.yaml @@ -17,6 +17,7 @@ spec: #prometheus.io/scheme: http spec: serviceAccountName: nginx-ingress + automountServiceAccountToken: true containers: - image: nginx-plus-ingress:2.3.0 imagePullPolicy: IfNotPresent diff --git a/deployments/deployment/nginx-ingress.yaml b/deployments/deployment/nginx-ingress.yaml index 8c8af43d83..575177be83 100644 --- a/deployments/deployment/nginx-ingress.yaml +++ b/deployments/deployment/nginx-ingress.yaml @@ -18,6 +18,7 @@ spec: #prometheus.io/scheme: http spec: serviceAccountName: nginx-ingress + automountServiceAccountToken: true containers: - image: nginx/nginx-ingress:2.3.0 imagePullPolicy: IfNotPresent diff --git a/deployments/deployment/nginx-plus-ingress.yaml b/deployments/deployment/nginx-plus-ingress.yaml index 8eaa51052d..fdac89b4b5 100644 --- a/deployments/deployment/nginx-plus-ingress.yaml +++ b/deployments/deployment/nginx-plus-ingress.yaml @@ -18,6 +18,7 @@ spec: #prometheus.io/scheme: http spec: serviceAccountName: nginx-ingress + automountServiceAccountToken: true containers: - image: nginx-plus-ingress:2.3.0 imagePullPolicy: IfNotPresent diff --git a/deployments/helm-chart/templates/controller-daemonset.yaml b/deployments/helm-chart/templates/controller-daemonset.yaml index 259567b28b..093ae71c45 100644 --- a/deployments/helm-chart/templates/controller-daemonset.yaml +++ b/deployments/helm-chart/templates/controller-daemonset.yaml @@ -38,6 +38,7 @@ spec: {{- end }} spec: serviceAccountName: {{ include "nginx-ingress.serviceAccountName" . }} + automountServiceAccountToken: true terminationGracePeriodSeconds: {{ .Values.controller.terminationGracePeriodSeconds }} {{- if .Values.controller.nodeSelector }} nodeSelector: diff --git a/deployments/helm-chart/templates/controller-deployment.yaml b/deployments/helm-chart/templates/controller-deployment.yaml index e0770143d4..fdefebf861 100644 --- a/deployments/helm-chart/templates/controller-deployment.yaml +++ b/deployments/helm-chart/templates/controller-deployment.yaml @@ -70,6 +70,7 @@ spec: priorityClassName: {{ .Values.controller.priorityClassName }} {{- end }} serviceAccountName: {{ include "nginx-ingress.serviceAccountName" . }} + automountServiceAccountToken: true terminationGracePeriodSeconds: {{ .Values.controller.terminationGracePeriodSeconds }} hostNetwork: {{ .Values.controller.hostNetwork }} containers: