Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(snapshot, restore): prevent volume mode conversion for restore as default behaviour #340

Merged
merged 1 commit into from
Sep 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"` |
Expand Down
6 changes: 6 additions & 0 deletions chart/templates/mayastor/csi/csi-controller-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
niladrih marked this conversation as resolved.
Show resolved Hide resolved
node:
logLevel: info
topology:
Expand Down