Skip to content

Commit 2000557

Browse files
Jack Charlie Munday1602077
authored andcommitted
feat(manila-csi): allow cluster-id to be pulled from env variables
Signed-off-by: Jack Charlie Munday <1602077@users.noreply.github.com>
1 parent a031201 commit 2000557

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ spec:
101101
{{- if .compatibilitySettings }}
102102
--compatibility-settings={{ .compatibilitySettings }}
103103
{{- end }}
104-
--cluster-id="{{ $.Values.csimanila.clusterID }}"
104+
--cluster-id=$(CLUSTER_NAME)
105105
{{- if $.Values.csimanila.pvcAnnotations }}
106106
--pvc-annotations
107107
{{- end }}'
@@ -115,9 +115,17 @@ spec:
115115
value: "unix://{{ .fwdNodePluginEndpoint.dir }}/{{ .fwdNodePluginEndpoint.sockFile }}"
116116
- name: MANILA_SHARE_PROTO
117117
value: "{{ .protocolSelector }}"
118+
{{- if $.Values.csimanila.clusterID }}
119+
- name: CLUSTER_NAME
120+
value: {{ $.Values.csimanila.clusterID }}
121+
{{- end }}
118122
{{- if $.Values.controllerplugin.nodeplugin.extraEnv }}
119123
{{- toYaml $.Values.controllerplugin.nodeplugin.extraEnv | nindent 12 }}
120124
{{- end }}
125+
{{- with $.Values.controllerplugin.nodeplugin.envFrom }}
126+
envFrom:
127+
{{- toYaml . | nindent 12 }}
128+
{{- end }}
121129
imagePullPolicy: {{ $.Values.csimanila.image.pullPolicy }}
122130
volumeMounts:
123131
- name: {{ .protocolSelector | lower }}-plugin-dir

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ spec:
6262
--drivername=$(DRIVER_NAME)
6363
--share-protocol-selector=$(MANILA_SHARE_PROTO)
6464
--fwdendpoint=$(FWD_CSI_ENDPOINT)
65-
--cluster-id="{{ $.Values.csimanila.clusterID }}"'
65+
--cluster-id=$(CLUSTER_NAME)'
6666
]
6767
env:
6868
- name: DRIVER_NAME
@@ -73,6 +73,10 @@ spec:
7373
value: "unix://{{ .fwdNodePluginEndpoint.dir }}/{{ .fwdNodePluginEndpoint.sockFile }}"
7474
- name: MANILA_SHARE_PROTO
7575
value: "{{ .protocolSelector }}"
76+
{{- if $.Values.csimanila.clusterID }}
77+
- name: CLUSTER_NAME
78+
value: "{{ $.Values.csimanila.clusterID }}"
79+
{{- end }}
7680
{{- if $.Values.nodeplugin.nodeplugin.extraEnv }}
7781
{{- toYaml $.Values.nodeplugin.nodeplugin.extraEnv | nindent 12 }}
7882
{{- end }}

0 commit comments

Comments
 (0)