From 6afc5668205c2a05e2de47daa06057e21c76d7e5 Mon Sep 17 00:00:00 2001 From: kahirokunn Date: Mon, 29 May 2023 13:15:28 +0900 Subject: [PATCH] chore: Allow to set accountServiceAccountToken in ServiceAccount Signed-off-by: kahirokunn --- .../templates/serviceaccount-csi-controller.yaml | 3 +++ .../aws-ebs-csi-driver/templates/serviceaccount-csi-node.yaml | 3 +++ charts/aws-ebs-csi-driver/values.yaml | 2 ++ 3 files changed, 8 insertions(+) diff --git a/charts/aws-ebs-csi-driver/templates/serviceaccount-csi-controller.yaml b/charts/aws-ebs-csi-driver/templates/serviceaccount-csi-controller.yaml index a5b1102b4c..d819f54937 100644 --- a/charts/aws-ebs-csi-driver/templates/serviceaccount-csi-controller.yaml +++ b/charts/aws-ebs-csi-driver/templates/serviceaccount-csi-controller.yaml @@ -15,4 +15,7 @@ metadata: #annotations: # eks.amazonaws.com/role-arn: arn::iam:::role/ebs-csi-role {{- end }} +{{- if .Values.controller.serviceAccount.automountServiceAccountToken }} +automountServiceAccountToken: {{ .Values.controller.serviceAccount.automountServiceAccountToken }} +{{- end }} {{- end -}} diff --git a/charts/aws-ebs-csi-driver/templates/serviceaccount-csi-node.yaml b/charts/aws-ebs-csi-driver/templates/serviceaccount-csi-node.yaml index fb85abedfe..9f3c7c7e10 100644 --- a/charts/aws-ebs-csi-driver/templates/serviceaccount-csi-node.yaml +++ b/charts/aws-ebs-csi-driver/templates/serviceaccount-csi-node.yaml @@ -10,4 +10,7 @@ metadata: annotations: {{- toYaml . | nindent 4 }} {{- end }} +{{- if .Values.node.serviceAccount.automountServiceAccountToken }} +automountServiceAccountToken: {{ .Values.node.serviceAccount.automountServiceAccountToken }} +{{- end }} {{- end -}} diff --git a/charts/aws-ebs-csi-driver/values.yaml b/charts/aws-ebs-csi-driver/values.yaml index 51c13bc493..532c7a4ad2 100644 --- a/charts/aws-ebs-csi-driver/values.yaml +++ b/charts/aws-ebs-csi-driver/values.yaml @@ -227,6 +227,7 @@ controller: create: true name: ebs-csi-controller-sa annotations: {} + automountServiceAccountToken: false tolerations: - key: CriticalAddonsOnly operator: Exists @@ -300,6 +301,7 @@ node: create: true name: ebs-csi-node-sa annotations: {} + automountServiceAccountToken: false enableWindows: false # The "maximum number of attachable volumes" per node volumeAttachLimit: