From cbb7d372353bc1b550ab163682c2501836bc7fa6 Mon Sep 17 00:00:00 2001 From: jichenjc Date: Mon, 16 Mar 2020 03:29:03 +0000 Subject: [PATCH] upgrade snapshot to v2.0.1 --- examples/cinder-csi-plugin/snapshot/example.yaml | 5 +++-- .../cinder-csi-plugin/snapshot/snapshotcreate.yaml | 4 ++-- .../cinder-csi-controllerplugin-rbac.yaml | 2 +- .../cinder-csi-controllerplugin.yaml | 4 ++-- .../cinder-csi-plugin/cinder-csi-nodeplugin.yaml | 11 +++++++++++ 5 files changed, 19 insertions(+), 7 deletions(-) diff --git a/examples/cinder-csi-plugin/snapshot/example.yaml b/examples/cinder-csi-plugin/snapshot/example.yaml index ea74b4ae88..d72599b94d 100644 --- a/examples/cinder-csi-plugin/snapshot/example.yaml +++ b/examples/cinder-csi-plugin/snapshot/example.yaml @@ -6,11 +6,12 @@ provisioner: cinder.csi.openstack.org --- -apiVersion: snapshot.storage.k8s.io/v1alpha1 +apiVersion: snapshot.storage.k8s.io/v1beta1 kind: VolumeSnapshotClass metadata: name: csi-cinder-snapclass -snapshotter: cinder.csi.openstack.org +driver: cinder.csi.openstack.org +deletionPolicy: Delete --- diff --git a/examples/cinder-csi-plugin/snapshot/snapshotcreate.yaml b/examples/cinder-csi-plugin/snapshot/snapshotcreate.yaml index 42b7dcd917..8dd246901d 100644 --- a/examples/cinder-csi-plugin/snapshot/snapshotcreate.yaml +++ b/examples/cinder-csi-plugin/snapshot/snapshotcreate.yaml @@ -1,9 +1,9 @@ -apiVersion: snapshot.storage.k8s.io/v1alpha1 +apiVersion: snapshot.storage.k8s.io/v1beta1 kind: VolumeSnapshot metadata: name: new-snapshot-demo spec: - snapshotClassName: csi-cinder-snapclass + volumeSnapshotClassName: csi-cinder-snapclass source: name: pvc-snapshot-demo kind: PersistentVolumeClaim diff --git a/manifests/cinder-csi-plugin/cinder-csi-controllerplugin-rbac.yaml b/manifests/cinder-csi-plugin/cinder-csi-controllerplugin-rbac.yaml index d39b6251f8..f4d93be410 100644 --- a/manifests/cinder-csi-plugin/cinder-csi-controllerplugin-rbac.yaml +++ b/manifests/cinder-csi-plugin/cinder-csi-controllerplugin-rbac.yaml @@ -120,7 +120,7 @@ rules: resources: ["volumesnapshots"] verbs: ["get", "list", "watch", "update"] - apiGroups: ["snapshot.storage.k8s.io"] - resources: ["volumesnapshots/status"] + resources: ["volumesnapshotcontents/status"] verbs: ["update"] - apiGroups: ["apiextensions.k8s.io"] resources: ["customresourcedefinitions"] diff --git a/manifests/cinder-csi-plugin/cinder-csi-controllerplugin.yaml b/manifests/cinder-csi-plugin/cinder-csi-controllerplugin.yaml index 2d9e443009..808f5bd1be 100644 --- a/manifests/cinder-csi-plugin/cinder-csi-controllerplugin.yaml +++ b/manifests/cinder-csi-plugin/cinder-csi-controllerplugin.yaml @@ -58,8 +58,8 @@ spec: volumeMounts: - name: socket-dir mountPath: /var/lib/csi/sockets/pluginproxy/ - - name: csi-snapshotter - image: quay.io/k8scsi/csi-snapshotter:v1.2.2 + - name: csi-snapshot-controller + image: quay.io/k8scsi/snapshot-controller:v2.0.1 args: - "--csi-address=$(ADDRESS)" env: diff --git a/manifests/cinder-csi-plugin/cinder-csi-nodeplugin.yaml b/manifests/cinder-csi-plugin/cinder-csi-nodeplugin.yaml index 79a14af326..c5cf1673c9 100644 --- a/manifests/cinder-csi-plugin/cinder-csi-nodeplugin.yaml +++ b/manifests/cinder-csi-plugin/cinder-csi-nodeplugin.yaml @@ -42,6 +42,17 @@ spec: mountPath: /csi - name: registration-dir mountPath: /registration + - name: csi-snapshotter + image: quay.io/k8scsi/csi-snapshotter:v2.0.1 + args: + - "--csi-address=$(ADDRESS)" + env: + - name: ADDRESS + value: /var/lib/csi/sockets/pluginproxy/csi.sock + imagePullPolicy: Always + volumeMounts: + - mountPath: /var/lib/csi/sockets/pluginproxy/ + name: socket-dir - name: cinder-csi-plugin securityContext: privileged: true