From ee11aae50a629e298fcd3db4dc02ec64c8237fe4 Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Wed, 2 Nov 2022 11:58:30 +0530 Subject: [PATCH 1/3] remove alpha snapshot deployment from hostpath driver Signed-off-by: Humble Chirammal --- examples/csi-snapshot.yaml | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 examples/csi-snapshot.yaml diff --git a/examples/csi-snapshot.yaml b/examples/csi-snapshot.yaml deleted file mode 100644 index 10ae3bcb5..000000000 --- a/examples/csi-snapshot.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: snapshot.storage.k8s.io/v1alpha1 -kind: VolumeSnapshot -metadata: - name: new-snapshot-demo -spec: - snapshotClassName: csi-hostpath-snapclass - source: - name: csi-pvc - kind: PersistentVolumeClaim From 9f10634271f932a5bf7bfbbce684beaf60f45f00 Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Wed, 2 Nov 2022 12:09:44 +0530 Subject: [PATCH 2/3] add snapshot v1 api object artifact and update doc This commit add v1 api object for snapshot and the readme has been updated to use v1 object instead of beta api object. Signed-off-by: Humble Chirammal --- docs/example-snapshots-1.17-and-later.md | 20 ++++++++++---------- examples/csi-snapshot-v1.yaml | 8 ++++++++ 2 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 examples/csi-snapshot-v1.yaml diff --git a/docs/example-snapshots-1.17-and-later.md b/docs/example-snapshots-1.17-and-later.md index c3c055c5b..6d4272032 100644 --- a/docs/example-snapshots-1.17-and-later.md +++ b/docs/example-snapshots-1.17-and-later.md @@ -21,8 +21,8 @@ Ensure your volumesnapshotclass was created during hostpath deployment: > Namespace: > Labels: > Annotations: kubectl.kubernetes.io/last-applied-configuration: -> {"apiVersion":"snapshot.storage.k8s.io/v1beta1","deletionPolicy":"Delete","driver":"hostpath.csi.k8s.io","kind":"VolumeSnapshotClass","met... -> API Version: snapshot.storage.k8s.io/v1beta1 +> {"apiVersion":"snapshot.storage.k8s.io/v1","deletionPolicy":"Delete","driver":"hostpath.csi.k8s.io","kind":"VolumeSnapshotClass","met... +> API Version: snapshot.storage.k8s.io/v1 > Deletion Policy: Delete > Driver: hostpath.csi.k8s.io > Kind: VolumeSnapshotClass @@ -30,14 +30,14 @@ Ensure your volumesnapshotclass was created during hostpath deployment: > Creation Timestamp: 2020-03-09T20:53:32Z > Generation: 1 > Resource Version: 938 -> Self Link: /apis/snapshot.storage.k8s.io/v1beta1/volumesnapshotclasses/csi-hostpath-snapclass +> Self Link: /apis/snapshot.storage.k8s.io/v1/volumesnapshotclasses/csi-hostpath-snapclass > UID: 8d2320cb-85fc-4908-9895-5ff8867169e2 > Events: > ``` After having created the `csi-pvc` as described in the deployment validation, use the volume snapshot class to dynamically create a volume snapshot: -> - `$ kubectl apply -f examples/csi-snapshot-v1beta1.yaml` +> - `$ kubectl apply -f examples/csi-snapshot-v1.yaml` > ``` > volumesnapshot.snapshot.storage.k8s.io/new-snapshot-demo created > ``` @@ -61,8 +61,8 @@ use the volume snapshot class to dynamically create a volume snapshot: > Namespace: default > Labels: > Annotations: kubectl.kubernetes.io/last-applied-configuration: -> {"apiVersion":"snapshot.storage.k8s.io/v1beta1","kind":"VolumeSnapshot","metadata":{"annotations":{},"name":"new-snapshot-demo","namespace... -> API Version: snapshot.storage.k8s.io/v1beta1 +> {"apiVersion":"snapshot.storage.k8s.io/v1","kind":"VolumeSnapshot","metadata":{"annotations":{},"name":"new-snapshot-demo","namespace... +> API Version: snapshot.storage.k8s.io/v1 > Kind: VolumeSnapshot > Metadata: > Creation Timestamp: 2020-03-09T21:45:04Z @@ -71,7 +71,7 @@ use the volume snapshot class to dynamically create a volume snapshot: > snapshot.storage.kubernetes.io/volumesnapshot-bound-protection > Generation: 1 > Resource Version: 11146 -> Self Link: /apis/snapshot.storage.k8s.io/v1beta1/namespaces/default/volumesnapshots/new-snapshot-demo +> Self Link: /apis/snapshot.storage.k8s.io/v1/namespaces/default/volumesnapshots/new-snapshot-demo > UID: 1b461d4e-6279-4f1d-9910-61d35d80c888 > Spec: > Source: @@ -92,7 +92,7 @@ use the volume snapshot class to dynamically create a volume snapshot: > Namespace: > Labels: > Annotations: -> API Version: snapshot.storage.k8s.io/v1beta1 +> API Version: snapshot.storage.k8s.io/v1 > Kind: VolumeSnapshotContent > Metadata: > Creation Timestamp: 2020-03-09T21:45:04Z @@ -100,7 +100,7 @@ use the volume snapshot class to dynamically create a volume snapshot: > snapshot.storage.kubernetes.io/volumesnapshotcontent-bound-protection > Generation: 1 > Resource Version: 11145 -> Self Link: /apis/snapshot.storage.k8s.io/v1beta1/volumesnapshotcontents/snapcontent-1b461d4e-6279-4f1d-9910-61d35d80c888 +> Self Link: /apis/snapshot.storage.k8s.io/v1/volumesnapshotcontents/snapcontent-1b461d4e-6279-4f1d-9910-61d35d80c888 > UID: 665657cd-4461-476c-9cdb-5c0490c58945 > Spec: > Deletion Policy: Delete @@ -109,7 +109,7 @@ use the volume snapshot class to dynamically create a volume snapshot: > Volume Handle: 42bdc1e0-624e-11ea-beee-42d40678b2d1 > Volume Snapshot Class Name: csi-hostpath-snapclass > Volume Snapshot Ref: -> API Version: snapshot.storage.k8s.io/v1beta1 +> API Version: snapshot.storage.k8s.io/v1 > Kind: VolumeSnapshot > Name: new-snapshot-demo > Namespace: default diff --git a/examples/csi-snapshot-v1.yaml b/examples/csi-snapshot-v1.yaml new file mode 100644 index 000000000..3292eb23c --- /dev/null +++ b/examples/csi-snapshot-v1.yaml @@ -0,0 +1,8 @@ +apiVersion: snapshot.storage.k8s.io/v1 +kind: VolumeSnapshot +metadata: + name: new-snapshot-demo +spec: + volumeSnapshotClassName: csi-hostpath-snapclass + source: + persistentVolumeClaimName: csi-pvc From ed5c90bdc3627e3f2ef6c5e5b1746bb573c80d76 Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Wed, 2 Nov 2022 12:14:44 +0530 Subject: [PATCH 3/3] update block pvc snapshot yaml to v1 object Signed-off-by: Humble Chirammal --- examples/csi-block-pvc-snapshot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/csi-block-pvc-snapshot.yaml b/examples/csi-block-pvc-snapshot.yaml index 8defbf031..47a353b6a 100644 --- a/examples/csi-block-pvc-snapshot.yaml +++ b/examples/csi-block-pvc-snapshot.yaml @@ -1,4 +1,4 @@ -apiVersion: snapshot.storage.k8s.io/v1alpha1 +apiVersion: snapshot.storage.k8s.io/v1 kind: VolumeSnapshot metadata: name: raw-pvc-snapshot