From 61279d70173fc8837a84c3e86c25d5fdd6d1da8e Mon Sep 17 00:00:00 2001 From: Sergey Berezansky Date: Mon, 2 Sep 2024 11:53:46 +0300 Subject: [PATCH] fix(CSI-243): service accounts for CSI plugin assume ImagePullSecret and cause error messages. --- .../templates/controllerserver-serviceaccount.yaml | 4 +++- .../csi-wekafsplugin/templates/nodeserver-serviceaccount.yaml | 4 +++- charts/csi-wekafsplugin/values.yaml | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/charts/csi-wekafsplugin/templates/controllerserver-serviceaccount.yaml b/charts/csi-wekafsplugin/templates/controllerserver-serviceaccount.yaml index 26a9794bf..aad9fd923 100644 --- a/charts/csi-wekafsplugin/templates/controllerserver-serviceaccount.yaml +++ b/charts/csi-wekafsplugin/templates/controllerserver-serviceaccount.yaml @@ -1,7 +1,9 @@ apiVersion: v1 kind: ServiceAccount +{{- if .Values.imagePullSecret}} imagePullSecrets: - - name: {{ .Release.Name }}-creds + - name: {{ .Values.imagePullSecret }} +{{- end }} metadata: name: {{ .Release.Name }}-controller namespace: {{ .Release.Namespace }} diff --git a/charts/csi-wekafsplugin/templates/nodeserver-serviceaccount.yaml b/charts/csi-wekafsplugin/templates/nodeserver-serviceaccount.yaml index 0e89c8443..c6b620b4d 100644 --- a/charts/csi-wekafsplugin/templates/nodeserver-serviceaccount.yaml +++ b/charts/csi-wekafsplugin/templates/nodeserver-serviceaccount.yaml @@ -1,7 +1,9 @@ apiVersion: v1 kind: ServiceAccount +{{- if .Values.imagePullSecret}} imagePullSecrets: - - name: {{ .Release.Name }}-creds + - name: {{ .Values.imagePullSecret }} +{{- end }} metadata: name: {{ .Release.Name }}-node namespace: {{ .Release.Namespace }} diff --git a/charts/csi-wekafsplugin/values.yaml b/charts/csi-wekafsplugin/values.yaml index ed1bcd908..342970188 100644 --- a/charts/csi-wekafsplugin/values.yaml +++ b/charts/csi-wekafsplugin/values.yaml @@ -25,6 +25,10 @@ images: csidriver: quay.io/weka.io/csi-wekafs # -- CSI driver tag csidriverTag: *csiDriverVersion +# -- image pull secret required for image download. Must have permissions to access all images above. +# Should be used in case of private registry that requires authentication +imagePullSecret: "" + # -- Tolerations for all CSI driver components globalPluginTolerations: &globalPluginTolerations - key: node-role.kubernetes.io/master