From 3e7b70b05a6b6a73d5a35e2704684fc5621e3d11 Mon Sep 17 00:00:00 2001 From: Aman Raj Date: Sun, 12 Jul 2026 03:38:50 +0530 Subject: [PATCH] feat(chart): expose automountServiceAccountToken in the csi-driver chart Allow disabling automatic mounting of the ServiceAccount token on the csi-driver pod, matching the option in the trust-manager chart. Defaults to true, preserving current behaviour. Regenerated the values schema and README. Signed-off-by: Aman Raj --- deploy/charts/csi-driver/README.md | 8 ++++++++ deploy/charts/csi-driver/templates/daemonset.yaml | 3 +++ deploy/charts/csi-driver/values.schema.json | 8 ++++++++ deploy/charts/csi-driver/values.yaml | 4 ++++ 4 files changed, 23 insertions(+) diff --git a/deploy/charts/csi-driver/README.md b/deploy/charts/csi-driver/README.md index f4690ee5..8a01ae00 100644 --- a/deploy/charts/csi-driver/README.md +++ b/deploy/charts/csi-driver/README.md @@ -407,6 +407,14 @@ Optional additional annotations to add to the csi-driver pods. > ``` Optional additional labels to add to the csi-driver pods. +#### **automountServiceAccountToken** ~ `bool` +> Default value: +> ```yaml +> true +> ``` + +Automounting API credentials for the csi-driver pod. + #### **resources** ~ `object` > Default value: > ```yaml diff --git a/deploy/charts/csi-driver/templates/daemonset.yaml b/deploy/charts/csi-driver/templates/daemonset.yaml index 8d4aacac..0e5009aa 100644 --- a/deploy/charts/csi-driver/templates/daemonset.yaml +++ b/deploy/charts/csi-driver/templates/daemonset.yaml @@ -35,6 +35,9 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "cert-manager-csi-driver.name" . }} + {{- if hasKey .Values "automountServiceAccountToken" }} + automountServiceAccountToken: {{ .Values.automountServiceAccountToken }} + {{- end }} {{- with .Values.priorityClassName }} priorityClassName: {{ . | quote }} {{- end }} diff --git a/deploy/charts/csi-driver/values.schema.json b/deploy/charts/csi-driver/values.schema.json index c669b53a..20c5e239 100644 --- a/deploy/charts/csi-driver/values.schema.json +++ b/deploy/charts/csi-driver/values.schema.json @@ -9,6 +9,9 @@ "app": { "$ref": "#/$defs/helm-values.app" }, + "automountServiceAccountToken": { + "$ref": "#/$defs/helm-values.automountServiceAccountToken" + }, "commonLabels": { "$ref": "#/$defs/helm-values.commonLabels" }, @@ -176,6 +179,11 @@ "description": "Verbosity of cert-manager-csi-driver logging.", "type": "number" }, + "helm-values.automountServiceAccountToken": { + "default": true, + "description": "Automounting API credentials for the csi-driver pod.", + "type": "boolean" + }, "helm-values.commonLabels": { "default": {}, "description": "Labels to apply to all resources.", diff --git a/deploy/charts/csi-driver/values.yaml b/deploy/charts/csi-driver/values.yaml index 921b3ad8..6f367c34 100644 --- a/deploy/charts/csi-driver/values.yaml +++ b/deploy/charts/csi-driver/values.yaml @@ -256,6 +256,10 @@ podAnnotations: {} # Optional additional labels to add to the csi-driver pods. podLabels: {} +# Automounting API credentials for the csi-driver pod. +# +docs:property +automountServiceAccountToken: true + # Kubernetes pod resources requests/limits for cert-manager-csi-driver. # # For example: