|
This is unreleased documentation for SUSE® Storage 1.13 (Dev). |
Enable CSI Volume Group Snapshot Support
Taking a CSI VolumeGroupSnapshot requires three things on top of regular CSI snapshot support:
-
The VolumeGroupSnapshot CRDs.
-
The
CSIVolumeGroupSnapshotfeature gate enabled on the snapshot-controller. -
The same feature gate enabled on the csi-snapshotter deployed by SUSE Storage.
Prerequisite: CSI snapshot support must be enabled on your cluster. See Enable CSI Snapshot Support.
|
Potential Snapshot Outage: Install the VolumeGroupSnapshot CRDs before enabling the |
Install the VolumeGroupSnapshot CRDs
The CRDs ship with external-snapshotter: VolumeGroupSnapshotClass, VolumeGroupSnapshot, and VolumeGroupSnapshotContent in the groupsnapshot.storage.k8s.io API group.
Use release v8.6.0 or later so they serve the v1 API. Replace <version> in the URLs below with your target release (e.g., v8.6.0) and apply:
kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/<version>/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotclasses.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/<version>/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshots.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/<version>/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotcontents.yaml
Enable the Feature Gate on the snapshot-controller
The snapshot-controller processes VolumeGroupSnapshot objects only when its CSIVolumeGroupSnapshot feature gate is on. The controller must also be from external-snapshotter v8.6.0 or later.
Add the feature gate to the controller arguments, adjusting the namespace to where your snapshot-controller is deployed (default is kube-system):
kubectl -n kube-system patch deploy snapshot-controller --type=json \
-p='[{"op":"add","path":"/spec/template/spec/containers/0/args/-","value":"--feature-gates=CSIVolumeGroupSnapshot=true"}]'
Enable VolumeGroupSnapshot Support in SUSE Storage
In SUSE Storage, VolumeGroupSnapshot support is off by default. Enabling it turns on the CSIVolumeGroupSnapshot feature gate of the csi-snapshotter that SUSE Storage deploys.
-
For Helm installations: Set the chart value
csi.volumeGroupSnapshotEnabledtotrue. -
For kubectl installations: Uncomment the
CSI_VOLUME_GROUP_SNAPSHOT_ENABLEDenvironment variable in thelonghorn-driver-deployerDeployment of the deploy manifest:- name: CSI_VOLUME_GROUP_SNAPSHOT_ENABLED value: "true"
When the SUSE Storage toggle is enabled but the VolumeGroupSnapshot CRDs are missing (or not served at v1), the SUSE Storage driver deployer will fail with an error naming the missing CRDs. However, regular per-volume snapshots will keep working. To recover, simply install the CRDs (or disable the toggle) and redeploy.