From f172f089cc4565106bf9dfac740c3d6ed8aaab9c Mon Sep 17 00:00:00 2001 From: Kevin Fox Date: Tue, 5 Feb 2019 13:29:16 -0800 Subject: [PATCH] Update helm chart to match static files This updates the helm chart to match all the changes that have been made to the static manifest files. Signed-off-by: Kevin Fox --- deploy/rbd/helm/Chart.yaml | 2 +- .../templates/nodeplugin-clusterrole.yaml | 3 +++ .../helm/templates/nodeplugin-daemonset.yaml | 20 ++++++++----------- .../templates/provisioner-clusterrole.yaml | 15 ++++++++++++++ .../templates/provisioner-statefulset.yaml | 17 ++++++++++++++++ deploy/rbd/helm/values.yaml | 18 ++++++++++++----- 6 files changed, 57 insertions(+), 18 deletions(-) diff --git a/deploy/rbd/helm/Chart.yaml b/deploy/rbd/helm/Chart.yaml index 353dfcd8c..0434bca53 100644 --- a/deploy/rbd/helm/Chart.yaml +++ b/deploy/rbd/helm/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "1.0.0" description: Container Storage Interface (CSI) driver, provisioner, and attacher for Ceph RBD name: ceph-csi-rbd -version: 0.2.0 +version: 0.3.0 keywords: - ceph - rbd diff --git a/deploy/rbd/helm/templates/nodeplugin-clusterrole.yaml b/deploy/rbd/helm/templates/nodeplugin-clusterrole.yaml index 525a702ec..111073ca4 100644 --- a/deploy/rbd/helm/templates/nodeplugin-clusterrole.yaml +++ b/deploy/rbd/helm/templates/nodeplugin-clusterrole.yaml @@ -22,4 +22,7 @@ rules: - apiGroups: ["storage.k8s.io"] resources: ["volumeattachments"] verbs: ["get", "list", "watch", "update"] + - apiGroups: [""] + resources: ["configmaps"] + verbs: ["get", "list"] {{- end -}} diff --git a/deploy/rbd/helm/templates/nodeplugin-daemonset.yaml b/deploy/rbd/helm/templates/nodeplugin-daemonset.yaml index 8b163aeb6..31ffa1db5 100644 --- a/deploy/rbd/helm/templates/nodeplugin-daemonset.yaml +++ b/deploy/rbd/helm/templates/nodeplugin-daemonset.yaml @@ -34,21 +34,21 @@ spec: image: "{{ .Values.nodeplugin.registrar.image.repository }}:{{ .Values.nodeplugin.registrar.image.tag }}" args: - "--v=5" - - "--csi-address=$(ADDRESS)" - - "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)" + - "--csi-address=/csi/{{ .Values.socketFile }}" + - "--kubelet-registration-path={{ .Values.socketDir }}/{{ .Values.socketFile }}" + lifecycle: + preStop: + exec: + command: ["/bin/sh", "-c", "rm -rf /registration/csi-rbdplugin /registration/csi-rbdplugin-reg.sock"] env: - - name: ADDRESS - value: "{{ .Values.socketDir }}/{{ .Values.socketFile }}" - - name: DRIVER_REG_SOCK_PATH - value: "{{ .Values.socketDir }}/{{ .Values.socketFile }}" - name: KUBE_NODE_NAME valueFrom: fieldRef: fieldPath: spec.nodeName imagePullPolicy: {{ .Values.nodeplugin.registrar.image.imagePullPolicy }} volumeMounts: - - name: socket-dir - mountPath: {{ .Values.socketDir }} + - name: plugin-dir + mountPath: /csi - name: registration-dir mountPath: /registration resources: @@ -114,10 +114,6 @@ spec: hostPath: path: /var/lib/kubelet/pods type: Directory - - name: socket-dir - hostPath: - path: {{ .Values.socketDir }} - type: DirectoryOrCreate - name: host-dev hostPath: path: /dev diff --git a/deploy/rbd/helm/templates/provisioner-clusterrole.yaml b/deploy/rbd/helm/templates/provisioner-clusterrole.yaml index 6b1cfdb70..1891dc6b1 100644 --- a/deploy/rbd/helm/templates/provisioner-clusterrole.yaml +++ b/deploy/rbd/helm/templates/provisioner-clusterrole.yaml @@ -28,4 +28,19 @@ rules: - apiGroups: [""] resources: ["endpoints"] verbs: ["get", "create", "update"] + - apiGroups: ["snapshot.storage.k8s.io"] + resources: ["volumesnapshots"] + verbs: ["get", "list", "watch", "update"] + - apiGroups: [""] + resources: ["configmaps"] + verbs: ["get", "list", "create", "delete"] + - apiGroups: ["snapshot.storage.k8s.io"] + resources: ["volumesnapshotcontents"] + verbs: ["create", "get", "list", "watch", "update", "delete"] + - apiGroups: ["snapshot.storage.k8s.io"] + resources: ["volumesnapshotclasses"] + verbs: ["get", "list", "watch"] + - apiGroups: ["apiextensions.k8s.io"] + resources: ["customresourcedefinitions"] + verbs: ["create"] {{- end -}} diff --git a/deploy/rbd/helm/templates/provisioner-statefulset.yaml b/deploy/rbd/helm/templates/provisioner-statefulset.yaml index ec9c94bc3..2a455ee50 100644 --- a/deploy/rbd/helm/templates/provisioner-statefulset.yaml +++ b/deploy/rbd/helm/templates/provisioner-statefulset.yaml @@ -41,6 +41,23 @@ spec: mountPath: {{ .Values.socketDir }} resources: {{ toYaml .Values.provisioner.resources | indent 12 }} + - name: csi-snapshotter + image: {{ .Values.snapshotter.image.repository }}:{{ .Values.snapshotter.image.tag }} + imagePullPolicy: {{ .Values.nodeplugin.plugin.image.imagePullPolicy }} + args: + - "--csi-address=$(ADDRESS)" + - "--connection-timeout=15s" + - "--v=5" + env: + - name: ADDRESS + value: "{{ .Values.socketDir }}/{{ .Values.socketFile }}" + securityContext: + privileged: true + volumeMounts: + - name: socket-dir + mountPath: {{ .Values.socketDir }} + resources: +{{ toYaml .Values.snapshotter.resources | indent 12 }} - name: csi-rbdplugin securityContext: privileged: true diff --git a/deploy/rbd/helm/values.yaml b/deploy/rbd/helm/values.yaml index fab0fb8d3..a55f459a1 100644 --- a/deploy/rbd/helm/values.yaml +++ b/deploy/rbd/helm/values.yaml @@ -12,7 +12,7 @@ serviceAccounts: create: true name: -socketDir: /var/lib/kubelet/plugins_registry/csi-rbdplugin +socketDir: /var/lib/kubelet/plugins/csi-rbdplugin socketFile: csi.sock registrationDir: /var/lib/kubelet/plugins_registry volumeDevicesDir: /var/lib/kubelet/plugins/kubernetes.io/csi/volumeDevices @@ -24,7 +24,7 @@ attacher: image: repository: quay.io/k8scsi/csi-attacher - tag: v1.0.0 + tag: v1.0.1 pullPolicy: IfNotPresent resources: {} @@ -40,8 +40,8 @@ nodeplugin: registrar: image: - repository: quay.io/k8scsi/driver-registrar - tag: canary + repository: quay.io/k8scsi/csi-node-driver-registrar + tag: v1.0.2 pullPolicy: IfNotPresent resources: {} @@ -67,7 +67,7 @@ provisioner: image: repository: quay.io/k8scsi/csi-provisioner - tag: canary + tag: v1.0.1 pullPolicy: IfNotPresent resources: {} @@ -77,3 +77,11 @@ provisioner: tolerations: [] affinity: {} + +snapshotter: + image: + repository: quay.io/k8scsi/csi-snapshotter + tag: v1.0.1 + pullPolicy: IfNotPresent + + resources: {}