Skip to content

Commit 92e9bf9

Browse files
timoreimannTimo Reimann
authored andcommitted
Document annotation to set default VolumeSnapshotClass
1 parent 093b0c2 commit 92e9bf9

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

content/en/docs/concepts/storage/volume-snapshot-classes.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,27 @@ request a particular class. Administrators set the name and other parameters
3939
of a class when first creating VolumeSnapshotClass objects, and the objects cannot
4040
be updated once they are created.
4141

42-
Administrators can specify a default VolumeSnapshotClass just for VolumeSnapshots
43-
that don't request any particular class to bind to.
42+
```yaml
43+
apiVersion: snapshot.storage.k8s.io/v1beta1
44+
kind: VolumeSnapshotClass
45+
metadata:
46+
name: csi-hostpath-snapclass
47+
driver: hostpath.csi.k8s.io
48+
deletionPolicy: Delete
49+
parameters:
50+
```
51+
52+
Administrators can specify a default VolumeSnapshotClass for VolumeSnapshots
53+
that don't request any particular class to bind to by adding the
54+
`snapshot.storage.kubernetes.io/is-default-class: "true"` annotation:
4455

4556
```yaml
4657
apiVersion: snapshot.storage.k8s.io/v1beta1
4758
kind: VolumeSnapshotClass
4859
metadata:
4960
name: csi-hostpath-snapclass
61+
annotations:
62+
snapshot.storage.kubernetes.io/is-default-class: "true"
5063
driver: hostpath.csi.k8s.io
5164
deletionPolicy: Delete
5265
parameters:

0 commit comments

Comments
 (0)