docs: fix VolumeGroupSnapshotClass example

The example VolumeGroupSnapshotClass cannot be applied as written. It
uses apiVersion v1alpha1, which external-snapshotter v8.2.0+ does not
serve, and nests driver and deletionPolicy under spec. Both fields are
top level and required on the CRD, which has no spec field at all.

Applying the documented example fails with:

  no matches for kind "VolumeGroupSnapshotClass" in version
  "groupsnapshot.storage.k8s.io/v1alpha1"

The same page already states that Velero 1.18.1+ uses the v1beta2 API
and requires external-snapshotter v8.2.0 or later, so the example also
contradicts its own prerequisites section.

Verified against a kind cluster running external-snapshotter v8.6.0:
the corrected example passes kubectl apply --dry-run=server, and the
CRD reports driver and deletionPolicy as top level and required across
v1, v1beta1 and v1beta2.

Signed-off-by: krishhna24 <krishhnatupedev@gmail.com>
This commit is contained in:
krishhna24
2026-09-10 18:38:15 +05:30
parent 3df8ef0567
commit 98e51ae8e6
2 changed files with 6 additions and 8 deletions
@@ -160,15 +160,14 @@ kubectl get volumegroupsnapshotclass -o wide
**Important:** The VolumeGroupSnapshotClass must have the label `velero.io/csi-volumegroupsnapshot-class: "true"` for Velero to automatically discover and use it:
```yaml
apiVersion: groupsnapshot.storage.k8s.io/v1alpha1
apiVersion: groupsnapshot.storage.k8s.io/v1beta2
kind: VolumeGroupSnapshotClass
metadata:
name: csi-vgs-class
labels:
velero.io/csi-volumegroupsnapshot-class: "true"
spec:
driver: ebs.csi.aws.com
deletionPolicy: Delete
driver: ebs.csi.aws.com
deletionPolicy: Delete
```
Verify your VolumeGroupSnapshotClass has the correct label:
@@ -160,15 +160,14 @@ kubectl get volumegroupsnapshotclass -o wide
**Important:** The VolumeGroupSnapshotClass must have the label `velero.io/csi-volumegroupsnapshot-class: "true"` for Velero to automatically discover and use it:
```yaml
apiVersion: groupsnapshot.storage.k8s.io/v1alpha1
apiVersion: groupsnapshot.storage.k8s.io/v1beta2
kind: VolumeGroupSnapshotClass
metadata:
name: csi-vgs-class
labels:
velero.io/csi-volumegroupsnapshot-class: "true"
spec:
driver: ebs.csi.aws.com
deletionPolicy: Delete
driver: ebs.csi.aws.com
deletionPolicy: Delete
```
Verify your VolumeGroupSnapshotClass has the correct label: