Snapshot: Template changes for snapshot beta

Updated the deployment templates and the sidecar
images version to support snapshot beta version.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2020-04-16 12:01:33 +05:30 committed by mergify[bot]
parent 2cdf5c3b9f
commit a116764f4d
6 changed files with 19 additions and 26 deletions

View File

@ -29,25 +29,22 @@ rules:
- apiGroups: [""] - apiGroups: [""]
resources: ["endpoints"] resources: ["endpoints"]
verbs: ["get", "create", "update"] verbs: ["get", "create", "update"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshots"]
verbs: ["get", "list", "watch", "update"]
{{- if .Values.provisioner.attacher.enabled }} {{- if .Values.provisioner.attacher.enabled }}
- apiGroups: ["storage.k8s.io"] - apiGroups: ["storage.k8s.io"]
resources: ["volumeattachments"] resources: ["volumeattachments"]
verbs: ["get", "list", "watch", "update", "patch"] verbs: ["get", "list", "watch", "update", "patch"]
{{- end }} {{- end }}
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshots"]
verbs: ["get", "list"]
- apiGroups: ["snapshot.storage.k8s.io"] - apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotcontents"] resources: ["volumesnapshotcontents"]
verbs: ["create", "get", "list", "watch", "update", "delete"] verbs: ["create", "get", "list", "watch", "update", "delete"]
- apiGroups: ["snapshot.storage.k8s.io"] - apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotclasses"] resources: ["volumesnapshotclasses"]
verbs: ["get", "list", "watch"] verbs: ["get", "list", "watch"]
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["create", "list", "watch", "delete", "get", "update"]
- apiGroups: ["snapshot.storage.k8s.io"] - apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshots/status"] resources: ["volumesnapshotcontents/status"]
verbs: ["update"] verbs: ["update"]
{{- if .Values.provisioner.resizer.enabled }} {{- if .Values.provisioner.resizer.enabled }}
- apiGroups: [""] - apiGroups: [""]

View File

@ -142,7 +142,7 @@ provisioner:
provisioner: provisioner:
image: image:
repository: quay.io/k8scsi/csi-provisioner repository: quay.io/k8scsi/csi-provisioner
tag: v1.4.0 tag: v1.6.0
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
resources: {} resources: {}
@ -167,7 +167,7 @@ provisioner:
snapshotter: snapshotter:
image: image:
repository: quay.io/k8scsi/csi-snapshotter repository: quay.io/k8scsi/csi-snapshotter
tag: v1.2.2 tag: v2.1.0
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
resources: {} resources: {}

View File

@ -37,21 +37,21 @@ rules:
- apiGroups: [""] - apiGroups: [""]
resources: ["persistentvolumeclaims"] resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update"] verbs: ["get", "list", "watch", "update"]
- apiGroups: [""]
resources: ["persistentvolumeclaims/status"]
verbs: ["update", "patch"]
- apiGroups: ["storage.k8s.io"] - apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"] resources: ["storageclasses"]
verbs: ["get", "list", "watch"] verbs: ["get", "list", "watch"]
- apiGroups: ["snapshot.storage.k8s.io"] - apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshots"] resources: ["volumesnapshots"]
verbs: ["get", "list", "watch", "update"] verbs: ["get", "list"]
- apiGroups: ["snapshot.storage.k8s.io"] - apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotcontents"] resources: ["volumesnapshotcontents"]
verbs: ["create", "get", "list", "watch", "update", "delete"] verbs: ["create", "get", "list", "watch", "update", "delete"]
- apiGroups: ["snapshot.storage.k8s.io"] - apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotclasses"] resources: ["volumesnapshotclasses"]
verbs: ["get", "list", "watch"] verbs: ["get", "list", "watch"]
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["create", "list", "watch", "delete", "get", "update"]
- apiGroups: ["storage.k8s.io"] - apiGroups: ["storage.k8s.io"]
resources: ["volumeattachments"] resources: ["volumeattachments"]
verbs: ["get", "list", "watch", "update", "patch"] verbs: ["get", "list", "watch", "update", "patch"]
@ -59,12 +59,8 @@ rules:
resources: ["csinodes"] resources: ["csinodes"]
verbs: ["get", "list", "watch"] verbs: ["get", "list", "watch"]
- apiGroups: ["snapshot.storage.k8s.io"] - apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshots/status"] resources: ["volumesnapshotcontents/status"]
verbs: ["update"] verbs: ["update"]
- apiGroups: [""]
resources: ["persistentvolumeclaims/status"]
verbs: ["update", "patch"]
--- ---
kind: ClusterRoleBinding kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1

View File

@ -32,7 +32,7 @@ spec:
serviceAccount: rbd-csi-provisioner serviceAccount: rbd-csi-provisioner
containers: containers:
- name: csi-provisioner - name: csi-provisioner
image: quay.io/k8scsi/csi-provisioner:v1.4.0 image: quay.io/k8scsi/csi-provisioner:v1.6.0
args: args:
- "--csi-address=$(ADDRESS)" - "--csi-address=$(ADDRESS)"
- "--v=5" - "--v=5"
@ -49,7 +49,7 @@ spec:
- name: socket-dir - name: socket-dir
mountPath: /csi mountPath: /csi
- name: csi-snapshotter - name: csi-snapshotter
image: quay.io/k8scsi/csi-snapshotter:v1.2.2 image: quay.io/k8scsi/csi-snapshotter:v2.1.0
args: args:
- "--csi-address=$(ADDRESS)" - "--csi-address=$(ADDRESS)"
- "--v=5" - "--v=5"

View File

@ -1,10 +1,9 @@
--- ---
apiVersion: snapshot.storage.k8s.io/v1alpha1 apiVersion: snapshot.storage.k8s.io/v1beta1
kind: VolumeSnapshot kind: VolumeSnapshot
metadata: metadata:
name: rbd-pvc-snapshot name: rbd-pvc-snapshot
spec: spec:
snapshotClassName: csi-rbdplugin-snapclass volumeSnapshotClassName: csi-rbdplugin-snapclass
source: source:
name: rbd-pvc persistentVolumeClaimName: rbd-pvc
kind: PersistentVolumeClaim

View File

@ -1,9 +1,9 @@
--- ---
apiVersion: snapshot.storage.k8s.io/v1alpha1 apiVersion: snapshot.storage.k8s.io/v1beta1
kind: VolumeSnapshotClass kind: VolumeSnapshotClass
metadata: metadata:
name: csi-rbdplugin-snapclass name: csi-rbdplugin-snapclass
snapshotter: rbd.csi.ceph.com driver: rbd.csi.ceph.com
parameters: parameters:
# String representing a Ceph cluster to provision storage from. # String representing a Ceph cluster to provision storage from.
# Should be unique across all Ceph clusters in use for provisioning, # Should be unique across all Ceph clusters in use for provisioning,
@ -16,3 +16,4 @@ parameters:
csi.storage.k8s.io/snapshotter-secret-name: csi-rbd-secret csi.storage.k8s.io/snapshotter-secret-name: csi-rbd-secret
csi.storage.k8s.io/snapshotter-secret-namespace: default csi.storage.k8s.io/snapshotter-secret-namespace: default
deletionPolicy: Delete