helm-charts
helm-charts copied to clipboard
Add an option for creating VolumeSnapshotClass for velero chart
Describe the problem/challenge you have
Currently the velero
helm-chart
does not have the ability to create volumesnapshotclass
, which is required to take a backup/snapshot of a PVC.
An example volumesnapshotclass
for an AKS cluster which (mostly) comes with the Azure CNI pre-installed:
---
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
name: csi-azuredisk-vsc
labels:
velero.io/csi-volumesnapshot-class: "true"
driver: disk.csi.azure.com
deletionPolicy: Delete
parameters:
incremental: "true" # available values: "true", "false" ("true" by default for Azure Public Cloud, and "false" by default for Azure Stack Cloud)
Source -> without the required velero.io/csi-volumesnapshot-class: "true"
label.
Describe the solution you'd like
Add a feature to the helm chart, which allows creating VolumeSnapshotClass
es like:
createVolumeSnapshotClass: enabled # defaults to disabled
volumeSnapshotClasses:
- name: csi-azuredisk-vsc
driver: disk.csi.azure.com
deletionPolicy: Delete
parameters:
- incremental: true
additionalLabels: # velero.io/csi-volumesnapshot-class: "true" should always be added
- label1: true
- label2: test
Anything else you would like to add:
Basically this could also be done during the CSI driver installation, though the velero
label is required, so this would be a cool feature for the velero
chart, if the csi
driver does not support creating a VolumeSnapshotClass
and would ease things for operators who want to use velero
for snapshotting PVCs.
Note: I would be willing to add this feature to the helm-chart
, but I first like to have a positive feedback, if this is considered a potentially merge able feature request.
@janaurka
- Is your case, how are the snapshot CRD and the snapshot controller installed in the cluster?
- Is there any open helm chart that support creating the VolumeSnapshotClass?
@jenting
- Is your case, how are the snapshot CRD and the snapshot controller installed in the cluster?
In AKS, the snapshot controller can be enabled for example via terraform using snapshot_controller_enabled
attribute and the CRD volumesnapshotclasses.snapshot.storage.k8s.io
is available afterward. however, a snapshot class is required to complete the snapshots for the disks. Hence it may be a good idea to ship the optional configuration for VolumeSnapshotClass
in the velero helm chart as this is a manual step for now.
Personally I don't think Velero helm chart should involve the life cycle management of the volume snapshot CRDs.
Instead, consider create your own chart which depends on the Velero helm chart and volume snapshot helm chart.