Skip to content

Commit 2602994

Browse files
authored
update helm chart to pass env vars and volumes (#348)
1 parent 1c3663a commit 2602994

File tree

3 files changed

+33
-2
lines changed

3 files changed

+33
-2
lines changed

helm-chart/csi-driver/templates/csi-linode-controller.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ spec:
9191
- name: CSI_ENDPOINT
9292
value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock
9393
- name: LINODE_URL
94-
value: https://api.linode.com/v4
94+
value: https://api.linode.com
9595
- name: LINODE_VOLUME_LABEL_PREFIX
9696
value: {{ .Values.volumeLabelPrefix | default "" | quote }}
9797
- name: NODE_NAME
@@ -112,6 +112,9 @@ spec:
112112
value: {{.Values.enableTracing | quote}}
113113
- name: OTEL_TRACING_PORT
114114
value: {{.Values.tracingPort | quote}}
115+
{{- with .Values.csiLinodePlugin.env }}
116+
{{- toYaml . | nindent 12 }}
117+
{{- end }}
115118
image: {{ .Values.csiLinodePlugin.image }}:{{ .Values.csiLinodePlugin.tag | default .Chart.AppVersion }}
116119
imagePullPolicy: {{ .Values.csiLinodePlugin.pullPolicy }}
117120
name: csi-linode-plugin
@@ -122,6 +125,9 @@ spec:
122125
name: get-linode-id
123126
- mountPath: /var/lib/csi/sockets/pluginproxy/
124127
name: socket-dir
128+
{{- with .Values.csiLinodePlugin.volumeMounts }}
129+
{{- toYaml . | nindent 12 }}
130+
{{- end }}
125131
initContainers:
126132
- command:
127133
- /scripts/get-linode-id.sh
@@ -167,3 +173,6 @@ spec:
167173
path: /dev
168174
type: Directory
169175
name: dev
176+
{{- with .Values.csiLinodePlugin.volumes }}
177+
{{- toYaml . | nindent 8 }}
178+
{{- end }}

helm-chart/csi-driver/templates/daemonset.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ spec:
4242
- name: CSI_ENDPOINT
4343
value: unix:///csi/csi.sock
4444
- name: LINODE_URL
45-
value: https://api.linode.com/v4
45+
value: https://api.linode.com
4646
- name: NODE_NAME
4747
valueFrom:
4848
fieldRef:
@@ -56,6 +56,9 @@ spec:
5656
value: {{ .Values.enableMetrics | quote}}
5757
- name: METRICS_PORT
5858
value: {{ .Values.metricsPort | quote}}
59+
{{- with .Values.csiLinodePlugin.env }}
60+
{{- toYaml . | nindent 8 }}
61+
{{- end }}
5962
image: {{ .Values.csiLinodePlugin.image }}:{{ .Values.csiLinodePlugin.tag | default .Chart.AppVersion }}
6063
imagePullPolicy: {{ .Values.csiLinodePlugin.pullPolicy }}
6164
name: csi-linode-plugin
@@ -79,6 +82,9 @@ spec:
7982
name: device-dir
8083
- mountPath: /tmp
8184
name: tmp
85+
{{- with .Values.csiLinodePlugin.volumeMounts }}
86+
{{- toYaml . | nindent 8 }}
87+
{{- end }}
8288
hostNetwork: true
8389
initContainers:
8490
- command:
@@ -158,3 +164,6 @@ spec:
158164
path: /tmp
159165
type: Directory
160166
name: tmp
167+
{{- with .Values.csiLinodePlugin.volumes }}
168+
{{- toYaml . | nindent 6 }}
169+
{{- end }}

helm-chart/csi-driver/values.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,19 @@ csiLinodePlugin:
6868
tag: # only set if required, defaults to .Chart.AppVersion set during release or "latest" by default
6969
pullPolicy: IfNotPresent
7070
podsMountDir: /var/lib/kubelet
71+
# This section adds the ability to pass environment variables to adjust CSI defaults
72+
env:
73+
# - name: EXAMPLE_ENV_VAR
74+
# value: "true"
75+
# This section adds the ability to pass volumes to the DaemonSet
76+
volumes:
77+
# - name: test-volume
78+
# emptyDir:
79+
# sizeLimit: 500Mi
80+
# this section adds the ability to pass volumeMounts to the container
81+
volumeMounts:
82+
# - mountPath: /tmp/
83+
# name: test-volume
7184

7285
kubectl:
7386
image: alpine/k8s # This needs to be alpine based and have both kubectl and curl installed.

0 commit comments

Comments
 (0)