Skip to content

Commit

Permalink
[manila-csi-plugin] Updated external-snapshotter to v2.1.1 and extern…
Browse files Browse the repository at this point in the history
…al-provisioner to v2.0.2 (#1205) (#1255)

* updated k8s manifests

* updated Helm chart

* updated examples

* updated docs

* fixed RBAC rules

external-provisioner needs VolumeSnapshots from snapshot.storage.k8s.io
with GET,LIST verbs for provisioning volumes from snapshots

* bumped chart's major version due to backwards incompatibility

* apiGroup is not versioned

* updated external-provisioner to v2.0.2

This is necessary in order to support v1beta1 snapshots as a data source.

Cherry-picked from b59a363
  • Loading branch information
gman0 authored Oct 5, 2020
1 parent dbdbac9 commit 277c9bb
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 29 deletions.
2 changes: 1 addition & 1 deletion charts/manila-csi-plugin/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: v1.19.0
description: Manila CSI Chart for OpenStack
name: openstack-manila-csi
version: 0.2.1
version: 1.0.0
home: http://github.com/kubernetes/cloud-provider-openstack
icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png
maintainers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,12 @@ rules:
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshots"]
verbs: ["get", "list"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotcontents"]
verbs: ["create", "get", "list", "watch", "update", "delete"]
- apiGroups: ["snapshot.storage.k8s.io"]
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"]
verbs: ["create", "list", "watch", "delete", "get", "update"]
4 changes: 2 additions & 2 deletions charts/manila-csi-plugin/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ controllerplugin:
provisioner:
image:
repository: quay.io/k8scsi/csi-provisioner
tag: v1.4.0
tag: v2.0.2
pullPolicy: IfNotPresent
resources: {}
# CSI external-snapshotter container spec
snapshotter:
image:
repository: quay.io/k8scsi/csi-snapshotter
tag: v1.2.2
tag: v2.1.1
pullPolicy: IfNotPresent
resources: {}
nodeSelector: {}
Expand Down
8 changes: 4 additions & 4 deletions docs/using-manila-csi-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- [Topology-aware dynamic provisioning](#topology-aware-dynamic-provisioning)
- [Runtime configuration file](#runtime-configuration-file)
- [Deployment](#deployment)
- [Kubernetes 1.15+](#kubernetes-115)
- [Kubernetes 1.17+](#kubernetes-117)
- [Verifying the deployment](#verifying-the-deployment)
- [Enabling topology awareness](#enabling-topology-awareness)
- [Share protocol support matrix](#share-protocol-support-matrix)
Expand Down Expand Up @@ -147,12 +147,12 @@ The CSI Manila driver deals with the Manila service only. All node-related opera

A single instance of the driver may serve only a single Manila share protocol. To serve multiple share protocols, multiple deployments of the driver need to be made. In order to avoid deployment collisions, each instance of the driver should be named differently, e.g. `csi-manila-cephfs`, `csi-manila-nfs`.

### Kubernetes 1.15+

Snapshots require `VolumeSnapshotDataSource=true` feature gate.
### Kubernetes 1.17+

The deployment consists of two main components: Controller and Node plugins along with their respective RBACs. Controller plugin is deployed as a StatefulSet and runs CSI Manila, [external-provisioner](https://github.com/kubernetes-csi/external-provisioner) and [external-snapshotter](https://github.com/kubernetes-csi/external-snapshotter). Node plugin is deployed as a DaemonSet and runs CSI Manila and [csi-node-driver-registrar](https://github.com/kubernetes-csi/node-driver-registrar).

Note: Snapshotting feature now requires a separate snapshot controller and CRDs to be deployed in the cluster. Please follow the related official [installation instructions](https://github.com/kubernetes-csi/external-snapshotter/blob/master/README.md#usage) for [external-snapshotter](https://github.com/kubernetes-csi/external-snapshotter) before continuing.

**Deploying with Helm**

This is the preferred way of deployment because it greatly simplifies the difficulties with managing multiple share protocols.
Expand Down
5 changes: 3 additions & 2 deletions examples/manila-csi-plugin/nfs/snapshot/snapshotclass.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
apiVersion: snapshot.storage.k8s.io/v1alpha1
apiVersion: snapshot.storage.k8s.io/v1beta1
kind: VolumeSnapshotClass
metadata:
name: csi-manila-nfs
snapshotter: nfs.manila.csi.openstack.org
driver: nfs.manila.csi.openstack.org
deletionPolicy: Delete
parameters:
csi.storage.k8s.io/snapshotter-secret-name: csi-manila-secrets
csi.storage.k8s.io/snapshotter-secret-namespace: default
7 changes: 3 additions & 4 deletions examples/manila-csi-plugin/nfs/snapshot/snapshotcreate.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
apiVersion: snapshot.storage.k8s.io/v1alpha1
apiVersion: snapshot.storage.k8s.io/v1beta1
kind: VolumeSnapshot
metadata:
name: new-nfs-share-snap
spec:
snapshotClassName: csi-manila-nfs
volumeSnapshotClassName: csi-manila-nfs
source:
name: new-nfs-share-pvc
kind: PersistentVolumeClaim
persistentVolumeClaimName: new-nfs-share-pvc
11 changes: 4 additions & 7 deletions manifests/manila-csi-plugin/csi-controllerplugin-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,15 @@ rules:
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshots"]
verbs: ["get", "list"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotcontents"]
verbs: ["create", "get", "list", "watch", "update", "delete"]
- apiGroups: ["snapshot.storage.k8s.io"]
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"]
verbs: ["create", "list", "watch", "delete", "get", "update"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
Expand Down
4 changes: 2 additions & 2 deletions manifests/manila-csi-plugin/csi-controllerplugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
serviceAccountName: openstack-manila-csi-controllerplugin
containers:
- name: provisioner
image: "quay.io/k8scsi/csi-provisioner:v1.4.0"
image: "quay.io/k8scsi/csi-provisioner:v2.0.2"
args:
- "--v=5"
- "--csi-address=$(ADDRESS)"
Expand All @@ -50,7 +50,7 @@ spec:
- name: plugin-dir
mountPath: /var/lib/kubelet/plugins/manila.csi.openstack.org
- name: snapshotter
image: "quay.io/k8scsi/csi-snapshotter:v1.2.2"
image: "quay.io/k8scsi/csi-snapshotter:v2.1.1"
args:
- "--v=5"
- "--csi-address=$(ADDRESS)"
Expand Down

0 comments on commit 277c9bb

Please sign in to comment.