From bafce00b3d3bde097bac92cf32d290255c4985cf Mon Sep 17 00:00:00 2001 From: "Ching Yi, Chan" Date: Wed, 3 Jun 2020 11:55:31 +0800 Subject: [PATCH 1/3] Migrate to StatefulSet app/v1 Signed-off-by: Ching Yi, Chan --- deploy/kubernetes/attacher.yaml | 5 ++++- deploy/kubernetes/csi-s3.yaml | 2 +- deploy/kubernetes/provisioner.yaml | 5 ++++- deploy/kubernetes/storageclass.yaml | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/deploy/kubernetes/attacher.yaml b/deploy/kubernetes/attacher.yaml index e944f85..891f037 100644 --- a/deploy/kubernetes/attacher.yaml +++ b/deploy/kubernetes/attacher.yaml @@ -54,13 +54,16 @@ spec: port: 12345 --- kind: StatefulSet -apiVersion: apps/v1beta1 +apiVersion: apps/v1 metadata: name: csi-attacher-s3 namespace: kube-system spec: serviceName: "csi-attacher-s3" replicas: 1 + selector: + matchLabels: + app: csi-attacher-s3 template: metadata: labels: diff --git a/deploy/kubernetes/csi-s3.yaml b/deploy/kubernetes/csi-s3.yaml index 608aee1..b55e581 100644 --- a/deploy/kubernetes/csi-s3.yaml +++ b/deploy/kubernetes/csi-s3.yaml @@ -39,7 +39,7 @@ roleRef: apiGroup: rbac.authorization.k8s.io --- kind: DaemonSet -apiVersion: apps/v1beta2 +apiVersion: apps/v1 metadata: name: csi-s3 namespace: kube-system diff --git a/deploy/kubernetes/provisioner.yaml b/deploy/kubernetes/provisioner.yaml index ea4cacb..711b541 100644 --- a/deploy/kubernetes/provisioner.yaml +++ b/deploy/kubernetes/provisioner.yaml @@ -53,13 +53,16 @@ spec: port: 12345 --- kind: StatefulSet -apiVersion: apps/v1beta1 +apiVersion: apps/v1 metadata: name: csi-provisioner-s3 namespace: kube-system spec: serviceName: "csi-provisioner-s3" replicas: 1 + selector: + matchLabels: + app: csi-provisioner-s3 template: metadata: labels: diff --git a/deploy/kubernetes/storageclass.yaml b/deploy/kubernetes/storageclass.yaml index 1bd02ed..ad6b39c 100644 --- a/deploy/kubernetes/storageclass.yaml +++ b/deploy/kubernetes/storageclass.yaml @@ -15,4 +15,4 @@ parameters: csi.storage.k8s.io/node-stage-secret-name: csi-s3-secret csi.storage.k8s.io/node-stage-secret-namespace: kube-system csi.storage.k8s.io/node-publish-secret-name: csi-s3-secret - csi.storage.k8s.io/node-publish-secret-namespace: kube-system \ No newline at end of file + csi.storage.k8s.io/node-publish-secret-namespace: kube-system From 1387389ae6491a8a82fb75dee5c546db403ed729 Mon Sep 17 00:00:00 2001 From: "Ching Yi, Chan" Date: Wed, 3 Jun 2020 12:08:27 +0800 Subject: [PATCH 2/3] Update README.md Signed-off-by: Ching Yi, Chan --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 80add03..63d36c5 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,8 @@ apiVersion: v1 kind: Secret metadata: name: csi-s3-secret + # Namespace depends on the configuration in the storageclass.yaml + namespace: kube-system stringData: accessKeyID: secretAccessKey: @@ -66,7 +68,7 @@ csi-s3-pvc Bound pvc-c5d4634f-8507-11e8-9f33-0e243832354b 5Gi RWO 3. Create a test pod which mounts your volume: ```bash -kubectl create -f poc.yaml +kubectl create -f pod.yaml ``` If the pod can start, everything should be working. From 2f98444ded9e1b96be5d7a6742953c0a9683f25f Mon Sep 17 00:00:00 2001 From: "Ching Yi, Chan" Date: Wed, 3 Jun 2020 13:54:08 +0800 Subject: [PATCH 3/3] Upgrade images Signed-off-by: Ching Yi, Chan --- deploy/kubernetes/attacher.yaml | 4 ++-- deploy/kubernetes/csi-s3.yaml | 2 +- deploy/kubernetes/provisioner.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy/kubernetes/attacher.yaml b/deploy/kubernetes/attacher.yaml index 891f037..922b566 100644 --- a/deploy/kubernetes/attacher.yaml +++ b/deploy/kubernetes/attacher.yaml @@ -23,7 +23,7 @@ rules: verbs: ["get", "list", "watch"] - apiGroups: ["storage.k8s.io"] resources: ["volumeattachments"] - verbs: ["get", "list", "watch", "update"] + verbs: ["get", "list", "watch", "update", "patch"] --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 @@ -72,7 +72,7 @@ spec: serviceAccount: csi-attacher-sa containers: - name: csi-attacher - image: quay.io/k8scsi/csi-attacher:v1.1.0 + image: quay.io/k8scsi/csi-attacher:v2.2.0 args: - "--v=4" - "--csi-address=$(ADDRESS)" diff --git a/deploy/kubernetes/csi-s3.yaml b/deploy/kubernetes/csi-s3.yaml index b55e581..8532696 100644 --- a/deploy/kubernetes/csi-s3.yaml +++ b/deploy/kubernetes/csi-s3.yaml @@ -56,7 +56,7 @@ spec: hostNetwork: true containers: - name: driver-registrar - image: quay.io/k8scsi/csi-node-driver-registrar:v1.1.0 + image: quay.io/k8scsi/csi-node-driver-registrar:v1.2.0 args: - "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)" - "--v=4" diff --git a/deploy/kubernetes/provisioner.yaml b/deploy/kubernetes/provisioner.yaml index 711b541..65ff2e6 100644 --- a/deploy/kubernetes/provisioner.yaml +++ b/deploy/kubernetes/provisioner.yaml @@ -71,7 +71,7 @@ spec: serviceAccount: csi-provisioner-sa containers: - name: csi-provisioner - image: quay.io/k8scsi/csi-provisioner:v1.1.0 + image: quay.io/k8scsi/csi-provisioner:v1.3.1 args: - "--provisioner=ch.ctrox.csi.s3-driver" - "--csi-address=$(ADDRESS)"