Skip to content
Merged
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
32 changes: 16 additions & 16 deletions book/src/group-snapshot-restore-feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

Status | Min K8s Version | Max K8s Version | snapshot-controller Version | snapshot-validation-webhook Version | CSI external-snapshotter sidecar Version | external-provisioner Version
--|--|--|--|--|--|--
Alpha | 1.27 | - | 7.0+ | 7.0+ | 7.0+ | 4.0+
Alpha | 1.27 | 1.32 | 7.0+ | 7.0+ | 7.0+ | 4.0+
Beta | 1.32 | - | 8.2+ | 8.2+ | 8.2+ | 5.1+

**IMPORTANT**: The validation logic for VolumeGroupSnapshots and VolumeGroupSnapshotContents has been replaced by CEL validation rules. The validating webhook is now only being used for VolumeGroupSnapshotClasses to ensure that there's at most one default class per CSI Driver. The validation webhook is deprecated and will be removed in the next release

Expand Down Expand Up @@ -131,35 +132,34 @@ kubectl label pvc hpvc hpvc-2 app.kubernetes.io/name=postgresql

Create a _VolumeGroupSnapshotClass_:
```
kubectl create -f groupsnapshotclass-v1alpha1.yaml
kubectl create -f groupsnapshotclass-v1beta1.yaml
```

Create a _VolumeGroupSnapshot_:
```
kubectl create -f groupsnapshot-v1alpha1.yaml
kubectl create -f groupsnapshot-v1beta1.yaml
```

Once the _VolumeGroupSnapshot_ is ready, list the _VolumeSnapshot_ whose owner is the _VolumeGroupSnapshot_:

```
kubectl get volumegroupsnapshot
NAME READYTOUSE VOLUMEGROUPSNAPSHOTCLASS VOLUMEGROUPSNAPSHOTCONTENT CREATIONTIME AGE
new-groupsnapshot-demo true csi-hostpath-groupsnapclass groupsnapcontent-fb7a1c20-54d3-444c-a604-b3ff0f4a8801 4m57s 5m26s
```

Once the _VolumeGroupSnapshot_ is ready, the `pvcVolumeSnapshotRefList` status field will contain the names of the generated _VolumeSnapshot_ objects:
```
kubectl get volumegroupsnapshot new-groupsnapshot-demo -o yaml | sed -n '/pvcVolumeSnapshotRefList/,$p'
kubectl get volumesnapshot -o=jsonpath='{range .items[?(@.metadata.ownerReferences[0].name=="new-groupsnapshot-demo")]}{.metadata.name}{"\n"}{end}'

pvcVolumeSnapshotRefList:
- persistentVolumeClaimRef:
name: hpvc
volumeSnapshotRef:
name: snapshot-4bcc4a322a473abf32babe3df5779d14349542b1f0eb6f9dab0466a85c59cd42-2024-06-19-12.35.17
- persistentVolumeClaimRef:
name: hpvc-2
volumeSnapshotRef:
name: snapshot-62bd0be591e1e10c22d51748cd4a53c0ae8bf52fabb482bee7bc51f8ff9d9589-2024-06-19-12.35.17
readyToUse: true
snapshot-4dc1c53a29538b36e85003503a4bcac5dbde4cff59e81f1e3bb80b6c18c3fd03
snapshot-fbfe59eff570171765df664280910c3bf1a4d56e233a5364cd8cb0152a35965b
```

Create a _PVC_ from a _VolumeSnapshot_ that is part of the group snapshot:
```
# In the command below, the volume snapshot name should be chosen from
# the ones listed in the output of the previous command
sed 's/new-snapshot-demo-v1/snapshot-4bcc4a322a473abf32babe3df5779d14349542b1f0eb6f9dab0466a85c59cd42-2024-06-19-12.35.17/' restore.yaml | kubectl create -f -
sed 's/new-snapshot-demo-v1/snapshot-4dc1c53a29538b36e85003503a4bcac5dbde4cff59e81f1e3bb80b6c18c3fd03/' restore.yaml | kubectl create -f -

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Madhu-1, the object name new-snapshot-demo-v1 is missing in the docs. The docs didn't mention how it is applied here.

I noticed that it references this file.

I am trying to replicate the example and I am having trouble restoring my actual snapshot. I think something may be missing, but I don't know what.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized that it replaces the dataSource name in the restore.yaml file with that of the snapshot.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes this is sed to replace the name in the restore.yaml from the repo

```

## Examples
Expand Down
Loading