Skip to content

Commit

Permalink
Support extraEnv on the cinder-csi-plugin helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
pli01 committed Jun 2, 2024
1 parent 59efe1c commit b971b45
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ spec:
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
{{- if .Values.csi.attacher.extraEnv }}
{{- toYaml .Values.csi.attacher.extraEnv | nindent 12 }}
{{- end }}
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
Expand All @@ -78,6 +81,9 @@ spec:
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
{{- if .Values.csi.provisioner.extraEnv }}
{{- toYaml .Values.csi.provisioner.extraEnv | nindent 12 }}
{{- end }}
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
Expand All @@ -100,6 +106,9 @@ spec:
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
{{- if .Values.csi.snapshotter.extraEnv }}
{{- toYaml .Values.csi.snapshotter.extraEnv | nindent 12 }}
{{- end }}
volumeMounts:
- mountPath: /var/lib/csi/sockets/pluginproxy/
name: socket-dir
Expand All @@ -123,6 +132,9 @@ spec:
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
{{- if .Values.csi.resizer.extraEnv }}
{{- toYaml .Values.csi.resizer.extraEnv | nindent 12 }}
{{- end }}
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
Expand All @@ -143,6 +155,9 @@ spec:
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
{{- if .Values.csi.livenessprobe.extraEnv }}
{{- toYaml .Values.csi.livenessprobe.extraEnv | nindent 12 }}
{{- end }}
volumeMounts:
- mountPath: /var/lib/csi/sockets/pluginproxy/
name: socket-dir
Expand Down Expand Up @@ -173,6 +188,9 @@ spec:
value: /etc/kubernetes/{{ .Values.secret.filename }}
- name: CLUSTER_NAME
value: "{{ .Values.clusterID }}"
{{- if .Values.csi.plugin.extraEnv }}
{{- toYaml .Values.csi.plugin.extraEnv | nindent 12 }}
{{- end }}
ports:
- containerPort: 9808
name: healthz
Expand Down
10 changes: 10 additions & 0 deletions charts/cinder-csi-plugin/templates/nodeplugin-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
{{- if .Values.csi.nodeDriverRegistrar.extraEnv }}
{{- toYaml .Values.csi.nodeDriverRegistrar.extraEnv | nindent 12 }}
{{- end }}
volumeMounts:
- name: socket-dir
mountPath: /csi
Expand All @@ -68,6 +71,10 @@ spec:
{{- tpl . $ | trim | nindent 12 }}
{{- end }}
{{- end }}
env:
{{- if .Values.csi.livenessprobe.extraEnv }}
{{- toYaml .Values.csi.livenessprobe.extraEnv | nindent 12 }}
{{- end }}
volumeMounts:
- name: socket-dir
mountPath: /csi
Expand Down Expand Up @@ -95,6 +102,9 @@ spec:
value: unix://csi/csi.sock
- name: CLOUD_CONFIG
value: /etc/kubernetes/{{ .Values.secret.filename }}
{{- if .Values.csi.plugin.extraEnv }}
{{- toYaml .Values.csi.plugin.extraEnv | nindent 12 }}
{{- end }}
ports:
- containerPort: 9808
name: healthz
Expand Down
7 changes: 7 additions & 0 deletions charts/cinder-csi-plugin/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ csi:
pullPolicy: IfNotPresent
resources: {}
extraArgs: {}
extraEnv: []
provisioner:
topology: "true"
image:
Expand All @@ -20,20 +21,23 @@ csi:
pullPolicy: IfNotPresent
resources: {}
extraArgs: {}
extraEnv: []
snapshotter:
image:
repository: registry.k8s.io/sig-storage/csi-snapshotter
tag: v6.3.2
pullPolicy: IfNotPresent
resources: {}
extraArgs: {}
extraEnv: []
resizer:
image:
repository: registry.k8s.io/sig-storage/csi-resizer
tag: v1.9.2
pullPolicy: IfNotPresent
resources: {}
extraArgs: {}
extraEnv: []
livenessprobe:
image:
repository: registry.k8s.io/sig-storage/livenessprobe
Expand All @@ -45,13 +49,15 @@ csi:
periodSeconds: 60
resources: {}
extraArgs: {}
extraEnv: []
nodeDriverRegistrar:
image:
repository: registry.k8s.io/sig-storage/csi-node-driver-registrar
tag: v2.9.2
pullPolicy: IfNotPresent
resources: {}
extraArgs: {}
extraEnv: []
plugin:
image:
repository: registry.k8s.io/provider-os/cinder-csi-plugin
Expand Down Expand Up @@ -131,6 +137,7 @@ csi:
podMonitor:
enabled: false
extraArgs: {}
extraEnv: []

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

0 comments on commit b971b45

Please sign in to comment.