Skip to content

Commit 76d7608

Browse files
authored
[cinder-csi-plugin] Add extraEnv support on cinder-csi-plugin and manila-csi-plugin helm charts (kubernetes#2613)
* Support extraEnv on the cinder-csi-plugin helm chart Signed-off-by: pli01 <[email protected]> * Support extraEnv on the cinder-csi-plugin helm chart Signed-off-by: pli01 <[email protected]> * Support extraEnv on manila-csi-plugin helm chart * typo --------- Signed-off-by: pli01 <[email protected]>
1 parent 59efe1c commit 76d7608

File tree

8 files changed

+61
-2
lines changed

8 files changed

+61
-2
lines changed

charts/cinder-csi-plugin/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v1
22
appVersion: v1.30.0
33
description: Cinder CSI Chart for OpenStack
44
name: openstack-cinder-csi
5-
version: 2.30.0
5+
version: 2.30.1-alpha.1
66
home: https://github.com/kubernetes/cloud-provider-openstack
77
icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png
88
maintainers:

charts/cinder-csi-plugin/templates/controllerplugin-deployment.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ spec:
5353
env:
5454
- name: ADDRESS
5555
value: /var/lib/csi/sockets/pluginproxy/csi.sock
56+
{{- if .Values.csi.attacher.extraEnv }}
57+
{{- toYaml .Values.csi.attacher.extraEnv | nindent 12 }}
58+
{{- end }}
5659
volumeMounts:
5760
- name: socket-dir
5861
mountPath: /var/lib/csi/sockets/pluginproxy/
@@ -78,6 +81,9 @@ spec:
7881
env:
7982
- name: ADDRESS
8083
value: /var/lib/csi/sockets/pluginproxy/csi.sock
84+
{{- if .Values.csi.provisioner.extraEnv }}
85+
{{- toYaml .Values.csi.provisioner.extraEnv | nindent 12 }}
86+
{{- end }}
8187
volumeMounts:
8288
- name: socket-dir
8389
mountPath: /var/lib/csi/sockets/pluginproxy/
@@ -100,6 +106,9 @@ spec:
100106
env:
101107
- name: ADDRESS
102108
value: /var/lib/csi/sockets/pluginproxy/csi.sock
109+
{{- if .Values.csi.snapshotter.extraEnv }}
110+
{{- toYaml .Values.csi.snapshotter.extraEnv | nindent 12 }}
111+
{{- end }}
103112
volumeMounts:
104113
- mountPath: /var/lib/csi/sockets/pluginproxy/
105114
name: socket-dir
@@ -123,6 +132,9 @@ spec:
123132
env:
124133
- name: ADDRESS
125134
value: /var/lib/csi/sockets/pluginproxy/csi.sock
135+
{{- if .Values.csi.resizer.extraEnv }}
136+
{{- toYaml .Values.csi.resizer.extraEnv | nindent 12 }}
137+
{{- end }}
126138
volumeMounts:
127139
- name: socket-dir
128140
mountPath: /var/lib/csi/sockets/pluginproxy/
@@ -143,6 +155,9 @@ spec:
143155
env:
144156
- name: ADDRESS
145157
value: /var/lib/csi/sockets/pluginproxy/csi.sock
158+
{{- if .Values.csi.livenessprobe.extraEnv }}
159+
{{- toYaml .Values.csi.livenessprobe.extraEnv | nindent 12 }}
160+
{{- end }}
146161
volumeMounts:
147162
- mountPath: /var/lib/csi/sockets/pluginproxy/
148163
name: socket-dir
@@ -173,6 +188,9 @@ spec:
173188
value: /etc/kubernetes/{{ .Values.secret.filename }}
174189
- name: CLUSTER_NAME
175190
value: "{{ .Values.clusterID }}"
191+
{{- if .Values.csi.plugin.extraEnv }}
192+
{{- toYaml .Values.csi.plugin.extraEnv | nindent 12 }}
193+
{{- end }}
176194
ports:
177195
- containerPort: 9808
178196
name: healthz

charts/cinder-csi-plugin/templates/nodeplugin-daemonset.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ spec:
4949
valueFrom:
5050
fieldRef:
5151
fieldPath: spec.nodeName
52+
{{- if .Values.csi.nodeDriverRegistrar.extraEnv }}
53+
{{- toYaml .Values.csi.nodeDriverRegistrar.extraEnv | nindent 12 }}
54+
{{- end }}
5255
volumeMounts:
5356
- name: socket-dir
5457
mountPath: /csi
@@ -68,6 +71,10 @@ spec:
6871
{{- tpl . $ | trim | nindent 12 }}
6972
{{- end }}
7073
{{- end }}
74+
env:
75+
{{- if .Values.csi.livenessprobe.extraEnv }}
76+
{{- toYaml .Values.csi.livenessprobe.extraEnv | nindent 12 }}
77+
{{- end }}
7178
volumeMounts:
7279
- name: socket-dir
7380
mountPath: /csi
@@ -95,6 +102,9 @@ spec:
95102
value: unix://csi/csi.sock
96103
- name: CLOUD_CONFIG
97104
value: /etc/kubernetes/{{ .Values.secret.filename }}
105+
{{- if .Values.csi.plugin.extraEnv }}
106+
{{- toYaml .Values.csi.plugin.extraEnv | nindent 12 }}
107+
{{- end }}
98108
ports:
99109
- containerPort: 9808
100110
name: healthz

charts/cinder-csi-plugin/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ csi:
1212
pullPolicy: IfNotPresent
1313
resources: {}
1414
extraArgs: {}
15+
extraEnv: []
1516
provisioner:
1617
topology: "true"
1718
image:
@@ -20,20 +21,23 @@ csi:
2021
pullPolicy: IfNotPresent
2122
resources: {}
2223
extraArgs: {}
24+
extraEnv: []
2325
snapshotter:
2426
image:
2527
repository: registry.k8s.io/sig-storage/csi-snapshotter
2628
tag: v6.3.2
2729
pullPolicy: IfNotPresent
2830
resources: {}
2931
extraArgs: {}
32+
extraEnv: []
3033
resizer:
3134
image:
3235
repository: registry.k8s.io/sig-storage/csi-resizer
3336
tag: v1.9.2
3437
pullPolicy: IfNotPresent
3538
resources: {}
3639
extraArgs: {}
40+
extraEnv: []
3741
livenessprobe:
3842
image:
3943
repository: registry.k8s.io/sig-storage/livenessprobe
@@ -45,13 +49,15 @@ csi:
4549
periodSeconds: 60
4650
resources: {}
4751
extraArgs: {}
52+
extraEnv: []
4853
nodeDriverRegistrar:
4954
image:
5055
repository: registry.k8s.io/sig-storage/csi-node-driver-registrar
5156
tag: v2.9.2
5257
pullPolicy: IfNotPresent
5358
resources: {}
5459
extraArgs: {}
60+
extraEnv: []
5561
plugin:
5662
image:
5763
repository: registry.k8s.io/provider-os/cinder-csi-plugin
@@ -131,6 +137,7 @@ csi:
131137
podMonitor:
132138
enabled: false
133139
extraArgs: {}
140+
extraEnv: []
134141

135142
# Log verbosity level.
136143
# See https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.md

charts/manila-csi-plugin/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v1
22
appVersion: v1.30.0
33
description: Manila CSI Chart for OpenStack
44
name: openstack-manila-csi
5-
version: 2.30.0
5+
version: 2.30.1-alpha.1
66
home: http://github.com/kubernetes/cloud-provider-openstack
77
icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png
88
maintainers:

charts/manila-csi-plugin/templates/controllerplugin-statefulset.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ spec:
3232
env:
3333
- name: ADDRESS
3434
value: "unix:///var/lib/kubelet/plugins/{{ printf "%s.%s" .protocolSelector $.Values.driverName | lower }}/csi-controllerplugin.sock"
35+
{{- if $.Values.controllerplugin.provisioner.extraEnv }}
36+
{{- toYaml $.Values.controllerplugin.provisioner.extraEnv | nindent 12 }}
37+
{{- end }}
3538
imagePullPolicy: {{ $.Values.controllerplugin.provisioner.image.pullPolicy }}
3639
volumeMounts:
3740
- name: {{ .protocolSelector | lower }}-plugin-dir
@@ -46,6 +49,9 @@ spec:
4649
env:
4750
- name: ADDRESS
4851
value: "unix:///var/lib/kubelet/plugins/{{ printf "%s.%s" .protocolSelector $.Values.driverName | lower }}/csi-controllerplugin.sock"
52+
{{- if $.Values.controllerplugin.snapshotter.extraEnv }}
53+
{{- toYaml $.Values.controllerplugin.snapshotter.extraEnv | nindent 12 }}
54+
{{- end }}
4955
imagePullPolicy: {{ $.Values.controllerplugin.snapshotter.image.pullPolicy }}
5056
volumeMounts:
5157
- name: {{ .protocolSelector | lower }}-plugin-dir
@@ -61,6 +67,9 @@ spec:
6167
env:
6268
- name: ADDRESS
6369
value: "unix:///var/lib/kubelet/plugins/{{ printf "%s.%s" .protocolSelector $.Values.driverName | lower }}/csi-controllerplugin.sock"
70+
{{- if $.Values.controllerplugin.resizer.extraEnv }}
71+
{{- toYaml $.Values.controllerplugin.resizer.extraEnv | nindent 12 }}
72+
{{- end }}
6473
imagePullPolicy: {{ $.Values.controllerplugin.resizer.image.pullPolicy }}
6574
volumeMounts:
6675
- name: {{ .protocolSelector | lower }}-plugin-dir
@@ -107,6 +116,9 @@ spec:
107116
value: "unix://{{ .fwdNodePluginEndpoint.dir }}/{{ .fwdNodePluginEndpoint.sockFile }}"
108117
- name: MANILA_SHARE_PROTO
109118
value: "{{ .protocolSelector }}"
119+
{{- if $.Values.controllerplugin.nodeplugin.extraEnv }}
120+
{{- toYaml $.Values.controllerplugin.nodeplugin.extraEnv | nindent 12 }}
121+
{{- end }}
110122
imagePullPolicy: {{ $.Values.csimanila.image.pullPolicy }}
111123
volumeMounts:
112124
- name: {{ .protocolSelector | lower }}-plugin-dir

charts/manila-csi-plugin/templates/nodeplugin-daemonset.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ spec:
2929
valueFrom:
3030
fieldRef:
3131
fieldPath: spec.nodeName
32+
{{- if $.Values.nodeplugin.registrar.extraEnv }}
33+
{{- toYaml $.Values.nodeplugin.registrar.extraEnv | nindent 12 }}
34+
{{- end }}
3235
imagePullPolicy: {{ $.Values.nodeplugin.registrar.image.pullPolicy }}
3336
volumeMounts:
3437
- name: {{ .protocolSelector | lower }}-plugin-dir
@@ -74,6 +77,9 @@ spec:
7477
value: "unix://{{ .fwdNodePluginEndpoint.dir }}/{{ .fwdNodePluginEndpoint.sockFile }}"
7578
- name: MANILA_SHARE_PROTO
7679
value: "{{ .protocolSelector }}"
80+
{{- if $.Values.nodeplugin.nodeplugin.extraEnv }}
81+
{{- toYaml $.Values.nodeplugin.nodeplugin.extraEnv | nindent 12 }}
82+
{{- end }}
7783
imagePullPolicy: {{ $.Values.csimanila.image.pullPolicy }}
7884
volumeMounts:
7985
- name: {{ .protocolSelector | lower }}-plugin-dir

charts/manila-csi-plugin/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,15 @@ nodeplugin:
5656
# CSI Manila container compute resources constraints
5757
nodeplugin:
5858
resources: {}
59+
extraEnv: []
5960
# csi-node-driver-registrar
6061
registrar:
6162
image:
6263
repository: registry.k8s.io/sig-storage/csi-node-driver-registrar
6364
tag: v2.4.0
6465
pullPolicy: IfNotPresent
6566
resources: {}
67+
extraEnv: []
6668
nodeSelector: {}
6769
tolerations: []
6870
affinity: {}
@@ -81,13 +83,15 @@ controllerplugin:
8183
# CSI Manila container compute resources constraints
8284
nodeplugin:
8385
resources: {}
86+
extraEnv: []
8487
# CSI external-provisioner container spec
8588
provisioner:
8689
image:
8790
repository: registry.k8s.io/sig-storage/csi-provisioner
8891
tag: v3.0.0
8992
pullPolicy: IfNotPresent
9093
resources: {}
94+
extraEnv: []
9195
# Whether to pass --extra-create-metadata flag to csi-provisioner.
9296
extraCreateMetadata: false
9397
# CSI external-snapshotter container spec
@@ -97,13 +101,15 @@ controllerplugin:
97101
tag: v5.0.1
98102
pullPolicy: IfNotPresent
99103
resources: {}
104+
extraEnv: []
100105
# CSI external-resizer container spec
101106
resizer:
102107
image:
103108
repository: registry.k8s.io/sig-storage/csi-resizer
104109
tag: v1.8.0
105110
pullPolicy: IfNotPresent
106111
resources: {}
112+
extraEnv: []
107113
nodeSelector: {}
108114
tolerations: []
109115
affinity: {}

0 commit comments

Comments
 (0)