-
Notifications
You must be signed in to change notification settings - Fork 12
/
volume-snapshot-content-pre-provisioned.yaml
30 lines (29 loc) · 1.38 KB
/
volume-snapshot-content-pre-provisioned.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# This must be created for the pre-provisioned volume snapshot content
# based on https://kubernetes.io/docs/concepts/storage/volume-snapshots/#volume-snapshot-contents
# If kubectl -f create fails with the following error
# no matches for kind "..." in version ".../v1beta1"
# please try with snapshot.storage.k8s.io/v1
# https://github.com/rook/rook/issues/6819#issuecomment-852059116
apiVersion: snapshot.storage.k8s.io/v1beta1
kind: VolumeSnapshotContent
metadata:
name: snapcontent-pre-provisioned
annotations:
# secrets are used during snapshot deletion and
# should contain quobyte user credentials
snapshot.storage.kubernetes.io/deletion-secret-name: quobyte-admin-credentials
snapshot.storage.kubernetes.io/deletion-secret-namespace: default
spec:
deletionPolicy: Delete
driver: csi.quobyte.com # your Quobyte CSI driver
source:
# snapshotHandle is combination of Quobyte Tenant, Volume and snapshot name
snapshotHandle: "<Tenant_Name/UUID>|<Volume_Name/UUID>|<Snapshot_Name>"
volumeSnapshotClassName: quobyte-csi-snapshotclass
volumeSnapshotRef:
# Name of the VolumeSnapshot object created in the future,
# see volume-snapshot-pre-provisioned.yaml
# This VolumeSnapshotContent can only bind to future VolumeSnapshot
# that is created with following matching name and namespace
name: volume-snapshot-pre-provisioned
namespace: default