Skip to content

Commit 28e7878

Browse files
committed
Reorganize extra environment variable values
1 parent 528a23b commit 28e7878

File tree

4 files changed

+24
-30
lines changed

4 files changed

+24
-30
lines changed

charts/aws-ebs-csi-driver/templates/controller.yaml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,10 @@ spec:
101101
- name: AWS_REGION
102102
value: {{ . }}
103103
{{- end }}
104-
{{- if .Values.controller.extraVars }}
105-
{{- range $key, $val := .Values.controller.extraVars }}
106-
- name: {{ $key }}
107-
value: "{{ $val }}"
108-
{{- end }}
109-
{{- end }}
110104
{{- if .Values.proxy.http_proxy }}
111105
{{- include "aws-ebs-csi-driver.http-proxy" . | nindent 12 }}
112106
{{- end }}
113-
{{- with .Values.controller.env.ebsPlugin }}
107+
{{- with .Values.controller.env }}
114108
{{- . | toYaml | nindent 12 }}
115109
{{- end }}
116110
volumeMounts:
@@ -157,7 +151,7 @@ spec:
157151
{{- if .Values.proxy.http_proxy }}
158152
{{- include "aws-ebs-csi-driver.http-proxy" . | nindent 12 }}
159153
{{- end }}
160-
{{- with .Values.controller.env.provisioner }}
154+
{{- with .Values.sidecars.provisioner.env }}
161155
{{- . | toYaml | nindent 12 }}
162156
{{- end }}
163157
volumeMounts:
@@ -179,7 +173,7 @@ spec:
179173
{{- if .Values.proxy.http_proxy }}
180174
{{- include "aws-ebs-csi-driver.http-proxy" . | nindent 12 }}
181175
{{- end }}
182-
{{- with .Values.controller.env.attacher }}
176+
{{- with .Values.sidecars.attacher.env }}
183177
{{- . | toYaml | nindent 12 }}
184178
{{- end }}
185179
volumeMounts:
@@ -201,7 +195,7 @@ spec:
201195
{{- if .Values.proxy.http_proxy }}
202196
{{- include "aws-ebs-csi-driver.http-proxy" . | nindent 12 }}
203197
{{- end }}
204-
{{- with .Values.controller.env.snapshotter }}
198+
{{- with .Values.sidecars.snapshotter.env }}
205199
{{- . | toYaml | nindent 12 }}
206200
{{- end }}
207201
volumeMounts:
@@ -224,7 +218,7 @@ spec:
224218
{{- if .Values.proxy.http_proxy }}
225219
{{- include "aws-ebs-csi-driver.http-proxy" . | nindent 12 }}
226220
{{- end }}
227-
{{- with .Values.controller.env.resizer }}
221+
{{- with .Values.sidecars.resizer.env }}
228222
{{- . | toYaml | nindent 12 }}
229223
{{- end }}
230224
volumeMounts:

charts/aws-ebs-csi-driver/templates/node.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ spec:
7575
{{- if .Values.proxy.http_proxy }}
7676
{{- include "aws-ebs-csi-driver.http-proxy" . | nindent 12 }}
7777
{{- end }}
78-
{{- with .Values.node.env.ebsPlugin }}
78+
{{- with .Values.node.env }}
7979
{{- . | toYaml | nindent 12 }}
8080
{{- end }}
8181
volumeMounts:
@@ -116,7 +116,7 @@ spec:
116116
{{- if .Values.proxy.http_proxy }}
117117
{{- include "aws-ebs-csi-driver.http-proxy" . | nindent 12 }}
118118
{{- end }}
119-
{{- with .Values.node.env.nodeDriverRegistrar }}
119+
{{- with .Values.sidecars.nodeDriverRegistrar.env }}
120120
{{- . | toYaml | nindent 12 }}
121121
{{- end }}
122122
volumeMounts:

charts/aws-ebs-csi-driver/values.yaml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,21 @@ image:
99

1010
sidecars:
1111
provisioner:
12+
env: []
1213
image:
1314
repository: k8s.gcr.io/sig-storage/csi-provisioner
1415
tag: "v2.1.1"
1516
logLevel: 2
1617
resources: {}
1718
attacher:
19+
env: []
1820
image:
1921
repository: k8s.gcr.io/sig-storage/csi-attacher
2022
tag: "v3.1.0"
2123
logLevel: 2
2224
resources: {}
2325
snapshotter:
26+
env: []
2427
image:
2528
repository: k8s.gcr.io/sig-storage/csi-snapshotter
2629
tag: "v3.0.3"
@@ -32,12 +35,14 @@ sidecars:
3235
tag: "v2.2.0"
3336
resources: {}
3437
resizer:
38+
env: []
3539
image:
3640
repository: k8s.gcr.io/sig-storage/csi-resizer
3741
tag: "v1.0.0"
3842
logLevel: 2
3943
resources: {}
4044
nodeDriverRegistrar:
45+
env: []
4146
image:
4247
repository: k8s.gcr.io/sig-storage/csi-node-driver-registrar
4348
tag: "v2.1.0"
@@ -56,17 +61,9 @@ controller:
5661
# If arbitrary args like "--aws-sdk-debug-log=true" need to be passed, use this value
5762
additionalArgs: []
5863
affinity: {}
59-
# True if enable volume scheduling for dynamic volume provisioning
60-
env:
61-
ebsPlugin: []
62-
provisioner: []
63-
attacher: []
64-
snapshotter: []
65-
resizer: []
64+
env: []
6665
# If set, add pv/pvc metadata to plugin create requests as parameters.
6766
extraCreateMetadata: true
68-
# Will be removed in later version in favor of env.ebsPlugin
69-
extraVars: {}
7067
# Extra volume tags to attach to each dynamically provisioned volume.
7168
# ---
7269
# extraVolumeTags:
@@ -88,10 +85,6 @@ controller:
8885
region:
8986
replicaCount: 2
9087
resources: {}
91-
serviceAccount:
92-
create: true # A service account will be created for you if set to true. Set to false if you want to use your own.
93-
name: ebs-csi-controller-sa # Name of the service-account to be used/created.
94-
annotations: {}
9588
# We usually recommend not to specify default resources and to leave this as a conscious
9689
# choice for the user. This also increases chances charts run on environments with little
9790
# resources, such as Minikube. If you do want to specify resources, uncomment the following
@@ -104,6 +97,10 @@ controller:
10497
# requests:
10598
# cpu: 100m
10699
# memory: 128Mi
100+
serviceAccount:
101+
create: true # A service account will be created for you if set to true. Set to false if you want to use your own.
102+
name: ebs-csi-controller-sa # Name of the service-account to be used/created.
103+
annotations: {}
107104
tolerations: []
108105
# TSCs without the label selector stanza
109106
#
@@ -119,9 +116,7 @@ controller:
119116
topologySpreadConstraints: []
120117

121118
node:
122-
env:
123-
ebsPlugin: []
124-
nodeDriverRegistrar: []
119+
env: []
125120
kubeletPath: /var/lib/kubelet
126121
logLevel: 2
127122
priorityClassName:

docs/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,20 +227,25 @@ sidecars:
227227
image:
228228
```
229229
230-
With the above reorganization `controller.containerResources` and `node.containerResources` were also moved into the sidecars structure as follows
230+
With the above reorganization `controller.containerResources`, `controller.env`, `node.containerResources`, and `node.env` were also moved into the sidecars structure as follows
231231
```yaml
232232
sidecars:
233233
provisioner:
234+
env: []
234235
resources: {}
235236
attacher:
237+
env: []
236238
resources: {}
237239
snapshotter:
240+
env: []
238241
resources: {}
239242
livenessProbe:
240243
resources: {}
241244
resizer:
245+
env: []
242246
resources: {}
243247
nodeDriverRegistrar:
248+
env: []
244249
resources: {}
245250
```
246251

0 commit comments

Comments
 (0)