From dc4d76da5933761d6896d433edab625ea4b85935 Mon Sep 17 00:00:00 2001 From: pli01 Date: Thu, 6 Jun 2024 15:36:35 +0200 Subject: [PATCH] Support extraEnv on manila-csi-plugin helm chart --- charts/manila-csi-plugin/Chart.yaml | 2 +- .../templates/controllerplugin-statefulset.yaml | 12 ++++++++++++ .../templates/nodeplugin-daemonset.yaml | 6 ++++++ charts/manila-csi-plugin/values.yaml | 6 ++++++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/charts/manila-csi-plugin/Chart.yaml b/charts/manila-csi-plugin/Chart.yaml index fd668767cf..a7cd93eec6 100644 --- a/charts/manila-csi-plugin/Chart.yaml +++ b/charts/manila-csi-plugin/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: v1.30.0 description: Manila CSI Chart for OpenStack name: openstack-manila-csi -version: 2.30.0 +version: 2.30.1-alpha.1 home: http://github.com/kubernetes/cloud-provider-openstack icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png maintainers: diff --git a/charts/manila-csi-plugin/templates/controllerplugin-statefulset.yaml b/charts/manila-csi-plugin/templates/controllerplugin-statefulset.yaml index 1e84be5ca5..91a443336d 100644 --- a/charts/manila-csi-plugin/templates/controllerplugin-statefulset.yaml +++ b/charts/manila-csi-plugin/templates/controllerplugin-statefulset.yaml @@ -32,6 +32,9 @@ spec: env: - name: ADDRESS value: "unix:///var/lib/kubelet/plugins/{{ printf "%s.%s" .protocolSelector $.Values.driverName | lower }}/csi-controllerplugin.sock" + {{- if $.Values.controllerplugin.provisioner.extraEnv }} + {{- toYaml $.Values.controllerplugin.provisioner.extraEnv | nindent 12 }} + {{- end }} imagePullPolicy: {{ $.Values.controllerplugin.provisioner.image.pullPolicy }} volumeMounts: - name: {{ .protocolSelector | lower }}-plugin-dir @@ -46,6 +49,9 @@ spec: env: - name: ADDRESS value: "unix:///var/lib/kubelet/plugins/{{ printf "%s.%s" .protocolSelector $.Values.driverName | lower }}/csi-controllerplugin.sock" + {{- if $.Values.controllerplugin.snapshotter.extraEnv }} + {{- toYaml $.Values.controllerplugin.snapshotter.extraEnv | nindent 12 }} + {{- end }} imagePullPolicy: {{ $.Values.controllerplugin.snapshotter.image.pullPolicy }} volumeMounts: - name: {{ .protocolSelector | lower }}-plugin-dir @@ -61,6 +67,9 @@ spec: env: - name: ADDRESS value: "unix:///var/lib/kubelet/plugins/{{ printf "%s.%s" .protocolSelector $.Values.driverName | lower }}/csi-controllerplugin.sock" + {{- if $.Values.controllerplugin.resizer.extraEnv }} + {{- toYaml $.Values.controllerplugin.resizer.extraEnv | nindent 12 }} + {{- end }} imagePullPolicy: {{ $.Values.controllerplugin.resizer.image.pullPolicy }} volumeMounts: - name: {{ .protocolSelector | lower }}-plugin-dir @@ -107,6 +116,9 @@ spec: value: "unix://{{ .fwdNodePluginEndpoint.dir }}/{{ .fwdNodePluginEndpoint.sockFile }}" - name: MANILA_SHARE_PROTO value: "{{ .protocolSelector }}" + {{- if $.Values.controllerplugin.nodeplugin.extraEnv }} + {{- toYaml $.Values.controllerplugin.nodeplugin.extraEnv | nindent 12 }} + {{- end }} imagePullPolicy: {{ $.Values.csimanila.image.pullPolicy }} volumeMounts: - name: {{ .protocolSelector | lower }}-plugin-dir diff --git a/charts/manila-csi-plugin/templates/nodeplugin-daemonset.yaml b/charts/manila-csi-plugin/templates/nodeplugin-daemonset.yaml index 597b472d0e..50647a62fc 100644 --- a/charts/manila-csi-plugin/templates/nodeplugin-daemonset.yaml +++ b/charts/manila-csi-plugin/templates/nodeplugin-daemonset.yaml @@ -29,6 +29,9 @@ spec: valueFrom: fieldRef: fieldPath: spec.nodeName + {{- if $.Values.nodeplugin.registrar.extraEnv }} + {{- toYaml $.Values.nodeplugin.registrar.extraEnv | nindent 12 }} + {{- end }} imagePullPolicy: {{ $.Values.nodeplugin.registrar.image.pullPolicy }} volumeMounts: - name: {{ .protocolSelector | lower }}-plugin-dir @@ -74,6 +77,9 @@ spec: value: "unix://{{ .fwdNodePluginEndpoint.dir }}/{{ .fwdNodePluginEndpoint.sockFile }}" - name: MANILA_SHARE_PROTO value: "{{ .protocolSelector }}" + {{- if $.Values.nodeplugin.nodeplugin.extraEnv }} + {{- toYaml $.Values.nodeplugin.nodeplugin.extraEnv | nindent 12 }} + {{- end }} imagePullPolicy: {{ $.Values.csimanila.image.pullPolicy }} volumeMounts: - name: {{ .protocolSelector | lower }}-plugin-dir diff --git a/charts/manila-csi-plugin/values.yaml b/charts/manila-csi-plugin/values.yaml index 7f86ce9777..44872e057b 100644 --- a/charts/manila-csi-plugin/values.yaml +++ b/charts/manila-csi-plugin/values.yaml @@ -56,6 +56,7 @@ nodeplugin: # CSI Manila container compute resources constraints nodeplugin: resources: {} + # extraEnv: [] # csi-node-driver-registrar registrar: image: @@ -63,6 +64,7 @@ nodeplugin: tag: v2.4.0 pullPolicy: IfNotPresent resources: {} + # extraEnv: [] nodeSelector: {} tolerations: [] affinity: {} @@ -81,6 +83,7 @@ controllerplugin: # CSI Manila container compute resources constraints nodeplugin: resources: {} + # extraEnv: [] # CSI external-provisioner container spec provisioner: image: @@ -88,6 +91,7 @@ controllerplugin: tag: v3.0.0 pullPolicy: IfNotPresent resources: {} + # extraEnv: [] # Whether to pass --extra-create-metadata flag to csi-provisioner. extraCreateMetadata: false # CSI external-snapshotter container spec @@ -97,6 +101,7 @@ controllerplugin: tag: v5.0.1 pullPolicy: IfNotPresent resources: {} + # extraEnv: [] # CSI external-resizer container spec resizer: image: @@ -104,6 +109,7 @@ controllerplugin: tag: v1.8.0 pullPolicy: IfNotPresent resources: {} + # extraEnv: [] nodeSelector: {} tolerations: [] affinity: {}