Skip to content

Commit ff2d675

Browse files
authored
helm: cinder-csi: Add extraArgs support for containers (#2160)
Add an extraArgs value to the various containers that are deployed by cinder-csi. Implementation is similar to occm helm chart
1 parent eb4f511 commit ff2d675

File tree

4 files changed

+53
-1
lines changed

4 files changed

+53
-1
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: latest
33
description: Cinder CSI Chart for OpenStack
44
name: openstack-cinder-csi
5-
version: 2.3.1
5+
version: 2.3.2
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: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ spec:
3333
- "--timeout={{ .Values.timeout }}"
3434
- "--leader-election=true"
3535
- "--default-fstype=ext4"
36+
{{- if .Values.csi.attacher.extraArgs }}
37+
{{- with .Values.csi.attacher.extraArgs }}
38+
{{- tpl . $ | trim | nindent 12 }}
39+
{{- end }}
40+
{{- end }}
3641
env:
3742
- name: ADDRESS
3843
value: /var/lib/csi/sockets/pluginproxy/csi.sock
@@ -51,6 +56,11 @@ spec:
5156
- "--default-fstype=ext4"
5257
- "--feature-gates=Topology={{ .Values.csi.provisioner.topology }}"
5358
- "--extra-create-metadata"
59+
{{- if .Values.csi.provisioner.extraArgs }}
60+
{{- with .Values.csi.provisioner.extraArgs }}
61+
{{- tpl . $ | trim | nindent 12 }}
62+
{{- end }}
63+
{{- end }}
5464
env:
5565
- name: ADDRESS
5666
value: /var/lib/csi/sockets/pluginproxy/csi.sock
@@ -66,6 +76,11 @@ spec:
6676
- "--csi-address=$(ADDRESS)"
6777
- "--timeout={{ .Values.timeout }}"
6878
- "--leader-election=true"
79+
{{- if .Values.csi.snapshotter.extraArgs }}
80+
{{- with .Values.csi.snapshotter.extraArgs }}
81+
{{- tpl . $ | trim | nindent 12 }}
82+
{{- end }}
83+
{{- end }}
6984
env:
7085
- name: ADDRESS
7186
value: /var/lib/csi/sockets/pluginproxy/csi.sock
@@ -82,6 +97,11 @@ spec:
8297
- "--timeout={{ .Values.timeout }}"
8398
- "--handle-volume-inuse-error=false"
8499
- "--leader-election=true"
100+
{{- if .Values.csi.resizer.extraArgs }}
101+
{{- with .Values.csi.resizer.extraArgs }}
102+
{{- tpl . $ | trim | nindent 12 }}
103+
{{- end }}
104+
{{- end }}
85105
env:
86106
- name: ADDRESS
87107
value: /var/lib/csi/sockets/pluginproxy/csi.sock
@@ -95,6 +115,11 @@ spec:
95115
args:
96116
- "-v={{ .Values.logVerbosityLevel }}"
97117
- "--csi-address=$(ADDRESS)"
118+
{{- if .Values.csi.livenessprobe.extraArgs }}
119+
{{- with .Values.csi.livenessprobe.extraArgs }}
120+
{{- tpl . $ | trim | nindent 12 }}
121+
{{- end }}
122+
{{- end }}
98123
env:
99124
- name: ADDRESS
100125
value: /var/lib/csi/sockets/pluginproxy/csi.sock
@@ -111,6 +136,11 @@ spec:
111136
- "--endpoint=$(CSI_ENDPOINT)"
112137
- "--cloud-config=$(CLOUD_CONFIG)"
113138
- "--cluster=$(CLUSTER_NAME)"
139+
{{- if .Values.csi.plugin.extraArgs }}
140+
{{- with .Values.csi.plugin.extraArgs }}
141+
{{- tpl . $ | trim | nindent 12 }}
142+
{{- end }}
143+
{{- end }}
114144
env:
115145
- name: CSI_ENDPOINT
116146
value: unix://csi/csi.sock

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ spec:
2424
- "-v={{ .Values.logVerbosityLevel }}"
2525
- "--csi-address=$(ADDRESS)"
2626
- "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)"
27+
{{- if .Values.csi.nodeDriverRegistrar.extraArgs }}
28+
{{- with .Values.csi.nodeDriverRegistrar.extraArgs }}
29+
{{- tpl . $ | trim | nindent 12 }}
30+
{{- end }}
31+
{{- end }}
2732
env:
2833
- name: ADDRESS
2934
value: /csi/csi.sock
@@ -45,6 +50,11 @@ spec:
4550
args:
4651
- "-v={{ .Values.logVerbosityLevel }}"
4752
- --csi-address=/csi/csi.sock
53+
{{- if .Values.csi.livenessprobe.extraArgs }}
54+
{{- with .Values.csi.livenessprobe.extraArgs }}
55+
{{- tpl . $ | trim | nindent 12 }}
56+
{{- end }}
57+
{{- end }}
4858
volumeMounts:
4959
- name: socket-dir
5060
mountPath: /csi
@@ -62,6 +72,11 @@ spec:
6272
- "-v={{ .Values.logVerbosityLevel }}"
6373
- "--endpoint=$(CSI_ENDPOINT)"
6474
- "--cloud-config=$(CLOUD_CONFIG)"
75+
{{- if .Values.csi.plugin.extraArgs }}
76+
{{- with .Values.csi.plugin.extraArgs }}
77+
{{- tpl . $ | trim | nindent 12 }}
78+
{{- end }}
79+
{{- end }}
6580
env:
6681
- name: CSI_ENDPOINT
6782
value: unix://csi/csi.sock

charts/cinder-csi-plugin/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,29 @@ csi:
1111
tag: v4.0.0
1212
pullPolicy: IfNotPresent
1313
resources: {}
14+
extraArgs: {}
1415
provisioner:
1516
topology: "true"
1617
image:
1718
repository: registry.k8s.io/sig-storage/csi-provisioner
1819
tag: v3.4.0
1920
pullPolicy: IfNotPresent
2021
resources: {}
22+
extraArgs: {}
2123
snapshotter:
2224
image:
2325
repository: registry.k8s.io/sig-storage/csi-snapshotter
2426
tag: v6.1.0
2527
pullPolicy: IfNotPresent
2628
resources: {}
29+
extraArgs: {}
2730
resizer:
2831
image:
2932
repository: registry.k8s.io/sig-storage/csi-resizer
3033
tag: v1.6.0
3134
pullPolicy: IfNotPresent
3235
resources: {}
36+
extraArgs: {}
3337
livenessprobe:
3438
image:
3539
repository: registry.k8s.io/sig-storage/livenessprobe
@@ -40,12 +44,14 @@ csi:
4044
timeoutSeconds: 10
4145
periodSeconds: 60
4246
resources: {}
47+
extraArgs: {}
4348
nodeDriverRegistrar:
4449
image:
4550
repository: registry.k8s.io/sig-storage/csi-node-driver-registrar
4651
tag: v2.6.2
4752
pullPolicy: IfNotPresent
4853
resources: {}
54+
extraArgs: {}
4955
plugin:
5056
image:
5157
repository: docker.io/k8scloudprovider/cinder-csi-plugin
@@ -85,6 +91,7 @@ csi:
8591
nodeSelector: {}
8692
tolerations: []
8793
resources: {}
94+
extraArgs: {}
8895

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

0 commit comments

Comments
 (0)