Skip to content

Commit

Permalink
feat(snapshot, restore): prevent volume mode conversion for restore a…
Browse files Browse the repository at this point in the history
…s default behaviour

Signed-off-by: Abhinandan Purkait <[email protected]>
  • Loading branch information
Abhinandan-Purkait committed Sep 15, 2023
1 parent feabbb7 commit fb24def
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
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.&ZeroWidthSpace;logSilenceLevel | Silence specific module components | `nil` |
| base.&ZeroWidthSpace;metrics.&ZeroWidthSpace;enabled | Enable the metrics exporter | `true` |
| csi.&ZeroWidthSpace;controller.&ZeroWidthSpace;logLevel | Log level for the csi controller | `"info"` |
| csi.&ZeroWidthSpace;controller.&ZeroWidthSpace;preventVolumeModeConversion | Prevent modifying the volume mode when creating a PVC from an existing VolumeSnapshot | `true` |
| csi.&ZeroWidthSpace;controller.&ZeroWidthSpace;priorityClassName | Set PriorityClass, overrides global | `""` |
| csi.&ZeroWidthSpace;controller.&ZeroWidthSpace;resources.&ZeroWidthSpace;limits.&ZeroWidthSpace;cpu | Cpu limits for csi controller | `"32m"` |
| csi.&ZeroWidthSpace;controller.&ZeroWidthSpace;resources.&ZeroWidthSpace;limits.&ZeroWidthSpace;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
node:
logLevel: info
topology:
Expand Down

0 comments on commit fb24def

Please sign in to comment.