diff --git a/chart/README.md b/chart/README.md index e0bacf55f..bd554da29 100644 --- a/chart/README.md +++ b/chart/README.md @@ -94,6 +94,7 @@ $ helm install my-release openebs/mayastor | base.​logSilenceLevel | Silence specific module components | `nil` | | base.​metrics.​enabled | Enable the metrics exporter | `true` | | csi.​controller.​logLevel | Log level for the csi controller | `"info"` | +| csi.​controller.​preventVolumeModeConversion | Prevent modifying the volume mode when creating a PVC from an existing VolumeSnapshot | `true` | | csi.​controller.​priorityClassName | Set PriorityClass, overrides global | `""` | | csi.​controller.​resources.​limits.​cpu | Cpu limits for csi controller | `"32m"` | | csi.​controller.​resources.​limits.​memory | Memory limits for csi controller | `"128Mi"` | diff --git a/chart/templates/mayastor/csi/csi-controller-deployment.yaml b/chart/templates/mayastor/csi/csi-controller-deployment.yaml index 1a664f076..c012b08e3 100644 --- a/chart/templates/mayastor/csi/csi-controller-deployment.yaml +++ b/chart/templates/mayastor/csi/csi-controller-deployment.yaml @@ -49,6 +49,9 @@ spec: - "--extra-create-metadata" # This is needed for volume group feature to work - "--timeout=36s" - "--worker-threads=10" # 10 for create and 10 for delete + {{- if default .Values.csi.controller.preventVolumeModeConversion }} + - "--prevent-volume-mode-conversion" + {{- end }} env: - name: ADDRESS value: /var/lib/csi/sockets/pluginproxy/csi.sock @@ -84,6 +87,9 @@ spec: args: - "--v=2" - "--leader-election=false" # since we are running single container + {{- if default .Values.csi.controller.preventVolumeModeConversion }} + - "--prevent-volume-mode-conversion" + {{- end }} image: "{{ .Values.csi.image.registry }}/{{ .Values.csi.image.repo }}/snapshot-controller:{{ .Values.csi.image.snapshotControllerTag }}" imagePullPolicy: {{ .Values.csi.image.pullPolicy }} - name: csi-controller diff --git a/chart/values.yaml b/chart/values.yaml index cf163815e..c8717df62 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -293,6 +293,8 @@ csi: tolerations: [] # -- Set PriorityClass, overrides global priorityClassName: "" + # -- Prevent modifying the volume mode when creating a PVC from an existing VolumeSnapshot + preventVolumeModeConversion: true node: logLevel: info topology: