Skip to content

Commit

Permalink
[cinder-csi-plugin] Add extraEnv support on cinder-csi-plugin and man…
Browse files Browse the repository at this point in the history
…ila-csi-plugin helm charts (#2613)

* Support extraEnv on the cinder-csi-plugin helm chart

Signed-off-by: pli01 <pli01@users.noreply.github.com>

* Support extraEnv on the cinder-csi-plugin helm chart

Signed-off-by: pli01 <pli01@users.noreply.github.com>

* Support extraEnv on manila-csi-plugin helm chart

* typo

---------

Signed-off-by: pli01 <pli01@users.noreply.github.com>
  • Loading branch information
pli01 authored Jun 7, 2024
1 parent 59efe1c commit 76d7608
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/cinder-csi-plugin/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: v1.30.0
description: Cinder CSI Chart for OpenStack
name: openstack-cinder-csi
version: 2.30.0
version: 2.30.1-alpha.1
home: https://github.com/kubernetes/cloud-provider-openstack
icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png
maintainers:
Expand Down
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
2 changes: 1 addition & 1 deletion charts/manila-csi-plugin/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: v1.30.0
description: Manila CSI Chart for OpenStack
name: openstack-manila-csi
version: 2.30.0
version: 2.30.1-alpha.1
home: http://github.com/kubernetes/cloud-provider-openstack
icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png
maintainers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ spec:
env:
- name: ADDRESS
value: "unix:///var/lib/kubelet/plugins/{{ printf "%s.%s" .protocolSelector $.Values.driverName | lower }}/csi-controllerplugin.sock"
{{- if $.Values.controllerplugin.provisioner.extraEnv }}
{{- toYaml $.Values.controllerplugin.provisioner.extraEnv | nindent 12 }}
{{- end }}
imagePullPolicy: {{ $.Values.controllerplugin.provisioner.image.pullPolicy }}
volumeMounts:
- name: {{ .protocolSelector | lower }}-plugin-dir
Expand All @@ -46,6 +49,9 @@ spec:
env:
- name: ADDRESS
value: "unix:///var/lib/kubelet/plugins/{{ printf "%s.%s" .protocolSelector $.Values.driverName | lower }}/csi-controllerplugin.sock"
{{- if $.Values.controllerplugin.snapshotter.extraEnv }}
{{- toYaml $.Values.controllerplugin.snapshotter.extraEnv | nindent 12 }}
{{- end }}
imagePullPolicy: {{ $.Values.controllerplugin.snapshotter.image.pullPolicy }}
volumeMounts:
- name: {{ .protocolSelector | lower }}-plugin-dir
Expand All @@ -61,6 +67,9 @@ spec:
env:
- name: ADDRESS
value: "unix:///var/lib/kubelet/plugins/{{ printf "%s.%s" .protocolSelector $.Values.driverName | lower }}/csi-controllerplugin.sock"
{{- if $.Values.controllerplugin.resizer.extraEnv }}
{{- toYaml $.Values.controllerplugin.resizer.extraEnv | nindent 12 }}
{{- end }}
imagePullPolicy: {{ $.Values.controllerplugin.resizer.image.pullPolicy }}
volumeMounts:
- name: {{ .protocolSelector | lower }}-plugin-dir
Expand Down Expand Up @@ -107,6 +116,9 @@ spec:
value: "unix://{{ .fwdNodePluginEndpoint.dir }}/{{ .fwdNodePluginEndpoint.sockFile }}"
- name: MANILA_SHARE_PROTO
value: "{{ .protocolSelector }}"
{{- if $.Values.controllerplugin.nodeplugin.extraEnv }}
{{- toYaml $.Values.controllerplugin.nodeplugin.extraEnv | nindent 12 }}
{{- end }}
imagePullPolicy: {{ $.Values.csimanila.image.pullPolicy }}
volumeMounts:
- name: {{ .protocolSelector | lower }}-plugin-dir
Expand Down
6 changes: 6 additions & 0 deletions charts/manila-csi-plugin/templates/nodeplugin-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
{{- if $.Values.nodeplugin.registrar.extraEnv }}
{{- toYaml $.Values.nodeplugin.registrar.extraEnv | nindent 12 }}
{{- end }}
imagePullPolicy: {{ $.Values.nodeplugin.registrar.image.pullPolicy }}
volumeMounts:
- name: {{ .protocolSelector | lower }}-plugin-dir
Expand Down Expand Up @@ -74,6 +77,9 @@ spec:
value: "unix://{{ .fwdNodePluginEndpoint.dir }}/{{ .fwdNodePluginEndpoint.sockFile }}"
- name: MANILA_SHARE_PROTO
value: "{{ .protocolSelector }}"
{{- if $.Values.nodeplugin.nodeplugin.extraEnv }}
{{- toYaml $.Values.nodeplugin.nodeplugin.extraEnv | nindent 12 }}
{{- end }}
imagePullPolicy: {{ $.Values.csimanila.image.pullPolicy }}
volumeMounts:
- name: {{ .protocolSelector | lower }}-plugin-dir
Expand Down
6 changes: 6 additions & 0 deletions charts/manila-csi-plugin/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,15 @@ nodeplugin:
# CSI Manila container compute resources constraints
nodeplugin:
resources: {}
extraEnv: []
# csi-node-driver-registrar
registrar:
image:
repository: registry.k8s.io/sig-storage/csi-node-driver-registrar
tag: v2.4.0
pullPolicy: IfNotPresent
resources: {}
extraEnv: []
nodeSelector: {}
tolerations: []
affinity: {}
Expand All @@ -81,13 +83,15 @@ controllerplugin:
# CSI Manila container compute resources constraints
nodeplugin:
resources: {}
extraEnv: []
# CSI external-provisioner container spec
provisioner:
image:
repository: registry.k8s.io/sig-storage/csi-provisioner
tag: v3.0.0
pullPolicy: IfNotPresent
resources: {}
extraEnv: []
# Whether to pass --extra-create-metadata flag to csi-provisioner.
extraCreateMetadata: false
# CSI external-snapshotter container spec
Expand All @@ -97,13 +101,15 @@ controllerplugin:
tag: v5.0.1
pullPolicy: IfNotPresent
resources: {}
extraEnv: []
# CSI external-resizer container spec
resizer:
image:
repository: registry.k8s.io/sig-storage/csi-resizer
tag: v1.8.0
pullPolicy: IfNotPresent
resources: {}
extraEnv: []
nodeSelector: {}
tolerations: []
affinity: {}
Expand Down

0 comments on commit 76d7608

Please sign in to comment.