From a4e3f8264182e573e8f54aa5dff823bc1c3d8aab Mon Sep 17 00:00:00 2001 From: 234u34k <234u34k@users.noreply.github.com> Date: Tue, 28 Jul 2026 07:12:45 -0700 Subject: [PATCH] cinder-csi: make csi-snapshotter sidecar optional --- charts/cinder-csi-plugin/Chart.yaml | 2 +- charts/cinder-csi-plugin/ci/snapshotter-disabled-values.yaml | 3 +++ charts/cinder-csi-plugin/ci/snapshotter-enabled-values.yaml | 3 +++ .../templates/controllerplugin-deployment.yaml | 2 ++ charts/cinder-csi-plugin/templates/controllerplugin-rbac.yaml | 2 ++ charts/cinder-csi-plugin/values.yaml | 1 + 6 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 charts/cinder-csi-plugin/ci/snapshotter-disabled-values.yaml create mode 100644 charts/cinder-csi-plugin/ci/snapshotter-enabled-values.yaml diff --git a/charts/cinder-csi-plugin/Chart.yaml b/charts/cinder-csi-plugin/Chart.yaml index c2d08ad0a7..2529cb8205 100644 --- a/charts/cinder-csi-plugin/Chart.yaml +++ b/charts/cinder-csi-plugin/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: v1.36.0 description: Cinder CSI Chart for OpenStack name: openstack-cinder-csi -version: 2.36.1 +version: 2.36.2 home: https://github.com/kubernetes/cloud-provider-openstack icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png maintainers: diff --git a/charts/cinder-csi-plugin/ci/snapshotter-disabled-values.yaml b/charts/cinder-csi-plugin/ci/snapshotter-disabled-values.yaml new file mode 100644 index 0000000000..f543091685 --- /dev/null +++ b/charts/cinder-csi-plugin/ci/snapshotter-disabled-values.yaml @@ -0,0 +1,3 @@ +csi: + snapshotter: + enabled: false diff --git a/charts/cinder-csi-plugin/ci/snapshotter-enabled-values.yaml b/charts/cinder-csi-plugin/ci/snapshotter-enabled-values.yaml new file mode 100644 index 0000000000..da1848bbc7 --- /dev/null +++ b/charts/cinder-csi-plugin/ci/snapshotter-enabled-values.yaml @@ -0,0 +1,3 @@ +csi: + snapshotter: + enabled: true diff --git a/charts/cinder-csi-plugin/templates/controllerplugin-deployment.yaml b/charts/cinder-csi-plugin/templates/controllerplugin-deployment.yaml index 6be37ce335..457c192cbf 100644 --- a/charts/cinder-csi-plugin/templates/controllerplugin-deployment.yaml +++ b/charts/cinder-csi-plugin/templates/controllerplugin-deployment.yaml @@ -86,6 +86,7 @@ spec: - name: socket-dir mountPath: /var/lib/csi/sockets/pluginproxy/ resources: {{ toYaml .Values.csi.provisioner.resources | nindent 12 }} + {{- if dig "enabled" true .Values.csi.snapshotter }} - name: csi-snapshotter securityContext: {{- toYaml .Values.csi.plugin.controllerPlugin.securityContext | nindent 12 }} @@ -111,6 +112,7 @@ spec: - mountPath: /var/lib/csi/sockets/pluginproxy/ name: socket-dir resources: {{ toYaml .Values.csi.snapshotter.resources | nindent 12 }} + {{- end }} - name: csi-resizer securityContext: {{- toYaml .Values.csi.plugin.controllerPlugin.securityContext | nindent 12 }} diff --git a/charts/cinder-csi-plugin/templates/controllerplugin-rbac.yaml b/charts/cinder-csi-plugin/templates/controllerplugin-rbac.yaml index 3d3c242249..27f05c54e3 100644 --- a/charts/cinder-csi-plugin/templates/controllerplugin-rbac.yaml +++ b/charts/cinder-csi-plugin/templates/controllerplugin-rbac.yaml @@ -88,6 +88,7 @@ roleRef: name: csi-provisioner-role apiGroup: rbac.authorization.k8s.io +{{- if dig "enabled" true .Values.csi.snapshotter }} --- kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 @@ -125,6 +126,7 @@ roleRef: kind: ClusterRole name: csi-snapshotter-role apiGroup: rbac.authorization.k8s.io +{{- end }} --- kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 diff --git a/charts/cinder-csi-plugin/values.yaml b/charts/cinder-csi-plugin/values.yaml index 4f94643e81..7e2b6a4f42 100644 --- a/charts/cinder-csi-plugin/values.yaml +++ b/charts/cinder-csi-plugin/values.yaml @@ -23,6 +23,7 @@ csi: extraArgs: {} extraEnv: [] snapshotter: + enabled: true image: repository: registry.k8s.io/sig-storage/csi-snapshotter tag: v8.4.0