From afda225d75329515f06cc581e30d5e8a333991b8 Mon Sep 17 00:00:00 2001 From: wilmardo Date: Thu, 26 Sep 2019 11:55:12 +0200 Subject: [PATCH] refactor: Merge 1.13 and 1.14 Helm charts and improve charts Signed-off-by: wilmardo --- .../ceph-csi-cephfs/.helmignore | 0 .../ceph-csi-cephfs/Chart.yaml | 6 +- .../helm => charts}/ceph-csi-cephfs/README.md | 2 +- .../ceph-csi-cephfs/templates/NOTES.txt | 0 .../ceph-csi-cephfs/templates/_helpers.tpl | 0 .../templates/csidriver-crd.yaml | 5 +- .../templates/csiplugin-configmap.yaml | 3 +- .../templates/nodeplugin-clusterrole.yaml | 0 .../nodeplugin-clusterrolebinding.yaml | 0 .../templates/nodeplugin-daemonset.yaml | 91 +++---- .../templates/nodeplugin-grpc-service.yaml | 41 ++++ .../templates/nodeplugin-http-service.yaml | 41 ++++ .../nodeplugin-rules-clusterrole.yaml | 0 .../templates/nodeplugin-serviceaccount.yaml | 0 .../templates/provisioner-clusterrole.yaml | 0 .../provisioner-clusterrolebinding.yaml | 0 .../templates/provisioner-deployment.yaml | 84 ++++--- .../templates/provisioner-grpc-service.yaml | 41 ++++ .../templates/provisioner-http-service.yaml | 41 ++++ .../templates/provisioner-role.yaml | 2 + .../templates/provisioner-rolebinding.yaml | 0 .../provisioner-rules-clusterrole.yaml | 6 +- .../templates/provisioner-service.yaml | 2 + .../templates/provisioner-serviceaccount.yaml | 0 .../templates/provisioner-statefulset.yaml | 82 ++++--- charts/ceph-csi-cephfs/values.yaml | 224 +++++++++++++++++ .../ceph-csi-rbd}/.helmignore | 0 .../helm => charts}/ceph-csi-rbd/Chart.yaml | 6 +- .../helm => charts}/ceph-csi-rbd/README.md | 0 .../ceph-csi-rbd/templates/NOTES.txt | 0 .../ceph-csi-rbd/templates/_helpers.tpl | 0 .../ceph-csi-rbd/templates/csidriver-crd.yaml | 5 +- .../templates/csiplugin-configmap.yaml | 3 +- .../templates/nodeplugin-clusterrole.yaml | 0 .../nodeplugin-clusterrolebinding.yaml | 0 .../templates/nodeplugin-daemonset.yaml | 75 +++--- .../templates/nodeplugin-grpc-service.yaml | 41 ++++ .../templates/nodeplugin-http-service.yaml | 41 ++++ .../nodeplugin-rules-clusterrole.yaml | 0 .../templates/nodeplugin-serviceaccount.yaml | 0 .../templates/provisioner-clusterrole.yaml | 0 .../provisioner-clusterrolebinding.yaml | 0 .../templates/provisioner-deployment.yaml | 94 +++++-- .../templates/provisioner-grpc-service.yaml | 41 ++++ .../templates/provisioner-http-service.yaml | 41 ++++ .../templates/provisioner-role.yaml | 2 + .../templates/provisioner-rolebinding.yaml | 0 .../provisioner-rules-clusterrole.yaml | 18 +- .../templates/provisioner-service.yaml | 6 +- .../templates/provisioner-serviceaccount.yaml | 0 .../templates/provisioner-statefulset.yaml | 102 ++++---- charts/ceph-csi-rbd/values.yaml | 231 ++++++++++++++++++ deploy.sh | 19 +- .../v1.13/helm/ceph-csi-cephfs/README.md | 29 --- .../templates/csidriver-crd.yaml | 11 - .../templates/csiplugin-configmap.yaml | 15 -- .../templates/nodeplugin-service.yaml | 25 -- .../templates/provisioner-role.yaml | 20 -- .../v1.13/helm/ceph-csi-cephfs/values.yaml | 71 ------ .../v1.14+/helm/ceph-csi-cephfs/Chart.yaml | 15 -- .../helm/ceph-csi-cephfs/templates/NOTES.txt | 2 - .../ceph-csi-cephfs/templates/_helpers.tpl | 90 ------- .../templates/nodeplugin-clusterrole.yaml | 17 -- .../nodeplugin-clusterrolebinding.yaml | 20 -- .../templates/nodeplugin-daemonset.yaml | 191 --------------- .../nodeplugin-rules-clusterrole.yaml | 32 --- .../templates/nodeplugin-service.yaml | 25 -- .../templates/nodeplugin-serviceaccount.yaml | 13 - .../templates/provisioner-clusterrole.yaml | 17 -- .../provisioner-clusterrolebinding.yaml | 20 -- .../templates/provisioner-rolebinding.yaml | 21 -- .../provisioner-rules-clusterrole.yaml | 40 --- .../templates/provisioner-service.yaml | 25 -- .../templates/provisioner-serviceaccount.yaml | 13 - .../v1.14+/helm/ceph-csi-cephfs/values.yaml | 71 ------ .../v1.13/helm/ceph-csi-rbd/.helmignore | 21 -- .../ceph-csi-rbd/templates/csidriver-crd.yaml | 10 - .../templates/csiplugin-configmap.yaml | 15 -- .../templates/nodeplugin-service.yaml | 25 -- .../templates/provisioner-role.yaml | 17 -- .../provisioner-rules-clusterrole.yaml | 55 ----- .../v1.13/helm/ceph-csi-rbd/values.yaml | 77 ------ .../v1.14+/helm/ceph-csi-rbd/.helmignore | 21 -- .../v1.14+/helm/ceph-csi-rbd/Chart.yaml | 15 -- .../v1.14+/helm/ceph-csi-rbd/README.md | 29 --- .../helm/ceph-csi-rbd/templates/NOTES.txt | 2 - .../helm/ceph-csi-rbd/templates/_helpers.tpl | 90 ------- .../templates/nodeplugin-clusterrole.yaml | 17 -- .../nodeplugin-clusterrolebinding.yaml | 20 -- .../templates/nodeplugin-daemonset.yaml | 182 -------------- .../nodeplugin-rules-clusterrole.yaml | 29 --- .../templates/nodeplugin-service.yaml | 25 -- .../templates/nodeplugin-serviceaccount.yaml | 13 - .../templates/provisioner-clusterrole.yaml | 17 -- .../provisioner-clusterrolebinding.yaml | 20 -- .../templates/provisioner-rolebinding.yaml | 21 -- .../templates/provisioner-serviceaccount.yaml | 13 - .../v1.14+/helm/ceph-csi-rbd/values.yaml | 78 ------ docs/deploy-cephfs.md | 11 + docs/deploy-rbd.md | 10 +- scripts/lint-text.sh | 4 +- 101 files changed, 1165 insertions(+), 1851 deletions(-) rename {deploy/cephfs/kubernetes/v1.13/helm => charts}/ceph-csi-cephfs/.helmignore (100%) rename {deploy/cephfs/kubernetes/v1.13/helm => charts}/ceph-csi-cephfs/Chart.yaml (73%) rename {deploy/cephfs/kubernetes/v1.14+/helm => charts}/ceph-csi-cephfs/README.md (92%) rename {deploy/cephfs/kubernetes/v1.13/helm => charts}/ceph-csi-cephfs/templates/NOTES.txt (100%) rename {deploy/cephfs/kubernetes/v1.13/helm => charts}/ceph-csi-cephfs/templates/_helpers.tpl (100%) rename {deploy/cephfs/kubernetes/v1.14+/helm => charts}/ceph-csi-cephfs/templates/csidriver-crd.yaml (74%) rename {deploy/cephfs/kubernetes/v1.14+/helm => charts}/ceph-csi-cephfs/templates/csiplugin-configmap.yaml (89%) rename {deploy/cephfs/kubernetes/v1.13/helm => charts}/ceph-csi-cephfs/templates/nodeplugin-clusterrole.yaml (100%) rename {deploy/cephfs/kubernetes/v1.13/helm => charts}/ceph-csi-cephfs/templates/nodeplugin-clusterrolebinding.yaml (100%) rename {deploy/cephfs/kubernetes/v1.13/helm => charts}/ceph-csi-cephfs/templates/nodeplugin-daemonset.yaml (79%) create mode 100644 charts/ceph-csi-cephfs/templates/nodeplugin-grpc-service.yaml create mode 100644 charts/ceph-csi-cephfs/templates/nodeplugin-http-service.yaml rename {deploy/cephfs/kubernetes/v1.13/helm => charts}/ceph-csi-cephfs/templates/nodeplugin-rules-clusterrole.yaml (100%) rename {deploy/cephfs/kubernetes/v1.13/helm => charts}/ceph-csi-cephfs/templates/nodeplugin-serviceaccount.yaml (100%) rename {deploy/cephfs/kubernetes/v1.13/helm => charts}/ceph-csi-cephfs/templates/provisioner-clusterrole.yaml (100%) rename {deploy/cephfs/kubernetes/v1.13/helm => charts}/ceph-csi-cephfs/templates/provisioner-clusterrolebinding.yaml (100%) rename {deploy/cephfs/kubernetes/v1.14+/helm => charts}/ceph-csi-cephfs/templates/provisioner-deployment.yaml (74%) create mode 100644 charts/ceph-csi-cephfs/templates/provisioner-grpc-service.yaml create mode 100644 charts/ceph-csi-cephfs/templates/provisioner-http-service.yaml rename {deploy/cephfs/kubernetes/v1.14+/helm => charts}/ceph-csi-cephfs/templates/provisioner-role.yaml (90%) rename {deploy/cephfs/kubernetes/v1.13/helm => charts}/ceph-csi-cephfs/templates/provisioner-rolebinding.yaml (100%) rename {deploy/cephfs/kubernetes/v1.13/helm => charts}/ceph-csi-cephfs/templates/provisioner-rules-clusterrole.yaml (91%) rename {deploy/cephfs/kubernetes/v1.13/helm => charts}/ceph-csi-cephfs/templates/provisioner-service.yaml (88%) rename {deploy/cephfs/kubernetes/v1.13/helm => charts}/ceph-csi-cephfs/templates/provisioner-serviceaccount.yaml (100%) rename {deploy/cephfs/kubernetes/v1.13/helm => charts}/ceph-csi-cephfs/templates/provisioner-statefulset.yaml (74%) create mode 100644 charts/ceph-csi-cephfs/values.yaml rename {deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs => charts/ceph-csi-rbd}/.helmignore (100%) rename {deploy/rbd/kubernetes/v1.13/helm => charts}/ceph-csi-rbd/Chart.yaml (74%) rename {deploy/rbd/kubernetes/v1.13/helm => charts}/ceph-csi-rbd/README.md (100%) rename {deploy/rbd/kubernetes/v1.13/helm => charts}/ceph-csi-rbd/templates/NOTES.txt (100%) rename {deploy/rbd/kubernetes/v1.13/helm => charts}/ceph-csi-rbd/templates/_helpers.tpl (100%) rename {deploy/rbd/kubernetes/v1.14+/helm => charts}/ceph-csi-rbd/templates/csidriver-crd.yaml (74%) rename {deploy/rbd/kubernetes/v1.14+/helm => charts}/ceph-csi-rbd/templates/csiplugin-configmap.yaml (89%) rename {deploy/rbd/kubernetes/v1.13/helm => charts}/ceph-csi-rbd/templates/nodeplugin-clusterrole.yaml (100%) rename {deploy/rbd/kubernetes/v1.13/helm => charts}/ceph-csi-rbd/templates/nodeplugin-clusterrolebinding.yaml (100%) rename {deploy/rbd/kubernetes/v1.13/helm => charts}/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml (80%) create mode 100644 charts/ceph-csi-rbd/templates/nodeplugin-grpc-service.yaml create mode 100644 charts/ceph-csi-rbd/templates/nodeplugin-http-service.yaml rename {deploy/rbd/kubernetes/v1.13/helm => charts}/ceph-csi-rbd/templates/nodeplugin-rules-clusterrole.yaml (100%) rename {deploy/rbd/kubernetes/v1.13/helm => charts}/ceph-csi-rbd/templates/nodeplugin-serviceaccount.yaml (100%) rename {deploy/rbd/kubernetes/v1.13/helm => charts}/ceph-csi-rbd/templates/provisioner-clusterrole.yaml (100%) rename {deploy/rbd/kubernetes/v1.13/helm => charts}/ceph-csi-rbd/templates/provisioner-clusterrolebinding.yaml (100%) rename {deploy/rbd/kubernetes/v1.14+/helm => charts}/ceph-csi-rbd/templates/provisioner-deployment.yaml (67%) create mode 100644 charts/ceph-csi-rbd/templates/provisioner-grpc-service.yaml create mode 100644 charts/ceph-csi-rbd/templates/provisioner-http-service.yaml rename {deploy/rbd/kubernetes/v1.14+/helm => charts}/ceph-csi-rbd/templates/provisioner-role.yaml (89%) rename {deploy/rbd/kubernetes/v1.13/helm => charts}/ceph-csi-rbd/templates/provisioner-rolebinding.yaml (100%) rename {deploy/rbd/kubernetes/v1.14+/helm => charts}/ceph-csi-rbd/templates/provisioner-rules-clusterrole.yaml (86%) rename {deploy/rbd/kubernetes/v1.13/helm => charts}/ceph-csi-rbd/templates/provisioner-service.yaml (82%) rename {deploy/rbd/kubernetes/v1.13/helm => charts}/ceph-csi-rbd/templates/provisioner-serviceaccount.yaml (100%) rename {deploy/rbd/kubernetes/v1.13/helm => charts}/ceph-csi-rbd/templates/provisioner-statefulset.yaml (73%) create mode 100644 charts/ceph-csi-rbd/values.yaml delete mode 100644 deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/README.md delete mode 100644 deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/csidriver-crd.yaml delete mode 100644 deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/csiplugin-configmap.yaml delete mode 100644 deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/nodeplugin-service.yaml delete mode 100644 deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/provisioner-role.yaml delete mode 100644 deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/values.yaml delete mode 100644 deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/Chart.yaml delete mode 100644 deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/NOTES.txt delete mode 100644 deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/_helpers.tpl delete mode 100644 deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/nodeplugin-clusterrole.yaml delete mode 100644 deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/nodeplugin-clusterrolebinding.yaml delete mode 100644 deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/nodeplugin-daemonset.yaml delete mode 100644 deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/nodeplugin-rules-clusterrole.yaml delete mode 100644 deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/nodeplugin-service.yaml delete mode 100644 deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/nodeplugin-serviceaccount.yaml delete mode 100644 deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-clusterrole.yaml delete mode 100644 deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-clusterrolebinding.yaml delete mode 100644 deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-rolebinding.yaml delete mode 100644 deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-rules-clusterrole.yaml delete mode 100644 deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-service.yaml delete mode 100644 deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-serviceaccount.yaml delete mode 100644 deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/values.yaml delete mode 100644 deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/.helmignore delete mode 100644 deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/csidriver-crd.yaml delete mode 100644 deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/csiplugin-configmap.yaml delete mode 100644 deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/nodeplugin-service.yaml delete mode 100644 deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/provisioner-role.yaml delete mode 100644 deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/provisioner-rules-clusterrole.yaml delete mode 100644 deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/values.yaml delete mode 100644 deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/.helmignore delete mode 100644 deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/Chart.yaml delete mode 100644 deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/README.md delete mode 100644 deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/NOTES.txt delete mode 100644 deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/_helpers.tpl delete mode 100644 deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/nodeplugin-clusterrole.yaml delete mode 100644 deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/nodeplugin-clusterrolebinding.yaml delete mode 100644 deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml delete mode 100644 deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/nodeplugin-rules-clusterrole.yaml delete mode 100644 deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/nodeplugin-service.yaml delete mode 100644 deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/nodeplugin-serviceaccount.yaml delete mode 100644 deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/provisioner-clusterrole.yaml delete mode 100644 deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/provisioner-clusterrolebinding.yaml delete mode 100644 deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/provisioner-rolebinding.yaml delete mode 100644 deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/provisioner-serviceaccount.yaml delete mode 100644 deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/values.yaml diff --git a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/.helmignore b/charts/ceph-csi-cephfs/.helmignore similarity index 100% rename from deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/.helmignore rename to charts/ceph-csi-cephfs/.helmignore diff --git a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/Chart.yaml b/charts/ceph-csi-cephfs/Chart.yaml similarity index 73% rename from deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/Chart.yaml rename to charts/ceph-csi-cephfs/Chart.yaml index 8643498fe..8539236fb 100644 --- a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/Chart.yaml +++ b/charts/ceph-csi-cephfs/Chart.yaml @@ -1,15 +1,15 @@ --- apiVersion: v1 -appVersion: "1.3.0" +appVersion: canary description: "Container Storage Interface (CSI) driver, provisioner, and attacher for Ceph cephfs" name: ceph-csi-cephfs -version: 0.9.0 +version: 1.3.0-canary keywords: - ceph - cephfs - ceph-csi home: https://github.com/ceph/ceph-csi sources: - - https://github.com/ceph/ceph-csi/tree/csi-v1.0/deploy/cephfs/helm + - https://github.com/ceph/ceph-csi/tree/master/charts/ceph-csi-cephfs icon: https://raw.githubusercontent.com/ceph/ceph-csi/master/assets/ceph-logo.png diff --git a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/README.md b/charts/ceph-csi-cephfs/README.md similarity index 92% rename from deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/README.md rename to charts/ceph-csi-cephfs/README.md index fcd4a98a8..c80ab0ff6 100644 --- a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/README.md +++ b/charts/ceph-csi-cephfs/README.md @@ -25,5 +25,5 @@ helm delete --purge "ceph-csi-cephfs" If you want to delete the namespace, use this command ```bash -kubectl delete namespace ceph-csi-rbd +kubectl delete namespace ceph-csi-cephfs ``` diff --git a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/NOTES.txt b/charts/ceph-csi-cephfs/templates/NOTES.txt similarity index 100% rename from deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/NOTES.txt rename to charts/ceph-csi-cephfs/templates/NOTES.txt diff --git a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/_helpers.tpl b/charts/ceph-csi-cephfs/templates/_helpers.tpl similarity index 100% rename from deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/_helpers.tpl rename to charts/ceph-csi-cephfs/templates/_helpers.tpl diff --git a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/csidriver-crd.yaml b/charts/ceph-csi-cephfs/templates/csidriver-crd.yaml similarity index 74% rename from deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/csidriver-crd.yaml rename to charts/ceph-csi-cephfs/templates/csidriver-crd.yaml index 8bdb83c4a..aaef955df 100644 --- a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/csidriver-crd.yaml +++ b/charts/ceph-csi-cephfs/templates/csidriver-crd.yaml @@ -1,5 +1,4 @@ ---- -{{ if not .Values.provisioner.attacher.enabled }} +{{- if not .Values.provisioner.attacher.enabled -}} apiVersion: storage.k8s.io/v1beta1 kind: CSIDriver metadata: @@ -8,4 +7,4 @@ metadata: spec: attachRequired: false podInfoOnMount: false -{{ end }} +{{- end -}} diff --git a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/csiplugin-configmap.yaml b/charts/ceph-csi-cephfs/templates/csiplugin-configmap.yaml similarity index 89% rename from deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/csiplugin-configmap.yaml rename to charts/ceph-csi-cephfs/templates/csiplugin-configmap.yaml index b89bd9e43..de0072321 100644 --- a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/csiplugin-configmap.yaml +++ b/charts/ceph-csi-cephfs/templates/csiplugin-configmap.yaml @@ -1,4 +1,3 @@ ---- apiVersion: v1 kind: ConfigMap metadata: @@ -12,4 +11,4 @@ metadata: heritage: {{ .Release.Service }} data: config.json: |- - [] +{{ toJson .Values.csiConfig | indent 4 -}} diff --git a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/nodeplugin-clusterrole.yaml b/charts/ceph-csi-cephfs/templates/nodeplugin-clusterrole.yaml similarity index 100% rename from deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/nodeplugin-clusterrole.yaml rename to charts/ceph-csi-cephfs/templates/nodeplugin-clusterrole.yaml diff --git a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/nodeplugin-clusterrolebinding.yaml b/charts/ceph-csi-cephfs/templates/nodeplugin-clusterrolebinding.yaml similarity index 100% rename from deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/nodeplugin-clusterrolebinding.yaml rename to charts/ceph-csi-cephfs/templates/nodeplugin-clusterrolebinding.yaml diff --git a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/nodeplugin-daemonset.yaml b/charts/ceph-csi-cephfs/templates/nodeplugin-daemonset.yaml similarity index 79% rename from deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/nodeplugin-daemonset.yaml rename to charts/ceph-csi-cephfs/templates/nodeplugin-daemonset.yaml index d61b9cc20..469d43a2a 100644 --- a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/nodeplugin-daemonset.yaml +++ b/charts/ceph-csi-cephfs/templates/nodeplugin-daemonset.yaml @@ -26,57 +26,59 @@ spec: spec: serviceAccountName: {{ include "ceph-csi-cephfs.serviceAccountName.nodeplugin" . }} hostNetwork: true - hostPID: true # to use e.g. Rook orchestrated cluster, and mons' FQDN is # resolved through k8s service, set dns policy to cluster first dnsPolicy: ClusterFirstWithHostNet containers: - name: driver-registrar image: "{{ .Values.nodeplugin.registrar.image.repository }}:{{ .Values.nodeplugin.registrar.image.tag }}" + imagePullPolicy: {{ .Values.nodeplugin.registrar.image.pullPolicy }} args: - "--v=5" - - "--csi-address=/csi/{{ .Values.socketFile }}" - - "--kubelet-registration-path={{ .Values.socketDir }}/{{ .Values.socketFile }}" + - "--csi-address=/csi/{{ .Values.pluginSocketFile }}" + - "--kubelet-registration-path={{ .Values.socketDir }}/{{ .Values.pluginSocketFile }}" lifecycle: preStop: exec: - command: [ - "/bin/sh", "-c", - 'rm -rf /registration/{{ .Values.driverName }} - /registration/{{ .Values.driverName }}-reg.sock' - ] + {{- /* + NOTE(wilmardo): The replace functions ensures there are no spaces in the string. + To avoid `rm -rf /registration/driver name` + */}} + command: [ + "/bin/sh", "-c", + "rm -rf /registration/{{ .Values.driverName | replace " " "" }} \ + /registration/{{ .Values.driverName | replace " " "" }}-reg.sock" + ] env: - name: KUBE_NODE_NAME valueFrom: fieldRef: fieldPath: spec.nodeName - imagePullPolicy: {{ .Values.nodeplugin.registrar.image.pullPolicy }} volumeMounts: - - name: plugin-dir + - name: socket-dir mountPath: /csi - name: registration-dir mountPath: /registration resources: {{ toYaml .Values.nodeplugin.registrar.resources | indent 12 }} - name: csi-cephfsplugin - securityContext: - privileged: true - capabilities: - add: ["SYS_ADMIN"] - allowPrivilegeEscalation: true image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}" - args : + imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} + args: - "--nodeid=$(NODE_ID)" - "--type=cephfs" - "--nodeserver=true" + - "--pidlimit=-1" +{{- if .Values.nodeplugin.grpcMetrics.enabled }} + - "--metricsport={{ .Values.nodeplugin.grpcMetrics.containerPort }}" + - "--metricspath=/metrics" + - "--enablegrpcmetrics=true" +{{- end }} - "--endpoint=$(CSI_ENDPOINT)" - "--v=5" - "--drivername=$(DRIVER_NAME)" - "--metadatastorage=k8s_configmap" - "--mountcachedir=/mount-cache-dir" - - "--metricsport=8091" - - "--metricspath=/metrics" - - "--enablegrpcmetrics=false" env: - name: POD_IP valueFrom: @@ -88,24 +90,30 @@ spec: valueFrom: fieldRef: fieldPath: spec.nodeName + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace - name: CSI_ENDPOINT - value: "unix:/{{ .Values.socketDir }}/{{ .Values.socketFile }}" - imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} + value: "unix:///csi/{{ .Values.pluginSocketFile }}" + securityContext: + privileged: true + capabilities: + add: ["SYS_ADMIN"] + allowPrivilegeEscalation: true volumeMounts: - name: mount-cache-dir mountPath: /mount-cache-dir - name: socket-dir - mountPath: {{ .Values.socketDir }} - - name: plugin-dir - mountPath: {{ .Values.pluginDir }} - mountPropagation: "Bidirectional" + mountPath: /csi - name: mountpoint-dir mountPath: /var/lib/kubelet/pods + mountPropagation: Bidirectional + - name: plugin-dir + mountPath: /var/lib/kubelet/plugins mountPropagation: "Bidirectional" - mountPath: /dev name: host-dev - - mountPath: /rootfs - name: host-rootfs - mountPath: /sys name: host-sys - mountPath: /lib/modules @@ -117,28 +125,30 @@ spec: mountPath: /tmp/csi/keys resources: {{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }} +{{- if .Values.nodeplugin.httpMetrics.enabled }} - name: liveness-prometheus image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}" + imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} args: - "--type=liveness" - "--endpoint=$(CSI_ENDPOINT)" - - "--metricsport=8081" + - "--metricsport={{ .Values.nodeplugin.httpMetrics.containerPort }}" - "--metricspath=/metrics" - "--polltime=60s" - "--timeout=3s" - imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} env: - name: CSI_ENDPOINT - value: "unix:/{{ .Values.socketDir }}/{{ .Values.socketFile }}" + value: "unix:///csi/{{ .Values.pluginSocketFile }}" - name: POD_IP valueFrom: fieldRef: fieldPath: status.podIP volumeMounts: - - name: plugin-dir - mountPath: {{ .Values.socketDir }} + - name: socket-dir + mountPath: /csi resources: {{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }} +{{- end }} volumes: - name: mount-cache-dir emptyDir: {} @@ -148,28 +158,25 @@ spec: type: DirectoryOrCreate - name: registration-dir hostPath: - path: {{ .Values.registrationDir }} - type: Directory - - name: plugin-dir - hostPath: - path: {{ .Values.pluginDir }} + path: /var/lib/kubelet/plugins_registry/ type: Directory - name: mountpoint-dir hostPath: path: /var/lib/kubelet/pods type: DirectoryOrCreate - - name: host-dev + - name: plugin-dir hostPath: - path: /dev - - name: host-rootfs - hostPath: - path: / + path: /var/lib/kubelet/plugins + type: Directory - name: host-sys hostPath: path: /sys - name: lib-modules hostPath: path: /lib/modules + - name: host-dev + hostPath: + path: /dev - name: ceph-csi-config configMap: name: {{ .Values.configMapName | quote }} diff --git a/charts/ceph-csi-cephfs/templates/nodeplugin-grpc-service.yaml b/charts/ceph-csi-cephfs/templates/nodeplugin-grpc-service.yaml new file mode 100644 index 000000000..6a2b8b344 --- /dev/null +++ b/charts/ceph-csi-cephfs/templates/nodeplugin-grpc-service.yaml @@ -0,0 +1,41 @@ +{{- if .Values.nodeplugin.grpcMetrics.service.enabled -}} +apiVersion: v1 +kind: Service +metadata: +{{- if .Values.nodeplugin.grpcMetrics.service.annotations }} + annotations: +{{ toYaml .Values.nodeplugin.grpcMetrics.service.annotations | indent 4 }} +{{- end }} + name: {{ include "ceph-csi-cephfs.nodeplugin.fullname" . }}-grpc-metrics + namespace: {{ .Release.Namespace }} + labels: + app: {{ include "ceph-csi-cephfs.fullname" . }} + chart: {{ include "ceph-csi-cephfs.chart" . }} + component: {{ .Values.nodeplugin.name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: +{{- if .Values.nodeplugin.grpcMetrics.service.clusterIP }} + clusterIP: "{{ .Values.nodeplugin.grpcMetrics.service.clusterIP }}" +{{- end }} +{{- if .Values.nodeplugin.grpcMetrics.service.externalIPs }} + externalIPs: +{{ toYaml .Values.nodeplugin.grpcMetrics.service.externalIPs | indent 4 }} +{{- end }} +{{- if .Values.nodeplugin.grpcMetrics.service.loadBalancerIP }} + loadBalancerIP: "{{ .Values.nodeplugin.grpcMetrics.service.loadBalancerIP }}" +{{- end }} +{{- if .Values.nodeplugin.grpcMetrics.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: +{{ toYaml .Values.nodeplugin.grpcMetrics.service.loadBalancerSourceRanges | indent 4 }} +{{- end }} + ports: + - name: grpc-metrics + port: {{ .Values.nodeplugin.grpcMetrics.service.servicePort }} + targetPort: {{ .Values.nodeplugin.grpcMetrics.containerPort }} + selector: + app: {{ include "ceph-csi-cephfs.name" . }} + component: {{ .Values.nodeplugin.name }} + release: {{ .Release.Name }} + type: "{{ .Values.nodeplugin.grpcMetrics.service.type }}" +{{- end -}} diff --git a/charts/ceph-csi-cephfs/templates/nodeplugin-http-service.yaml b/charts/ceph-csi-cephfs/templates/nodeplugin-http-service.yaml new file mode 100644 index 000000000..95fee84f2 --- /dev/null +++ b/charts/ceph-csi-cephfs/templates/nodeplugin-http-service.yaml @@ -0,0 +1,41 @@ +{{- if .Values.nodeplugin.httpMetrics.service.enabled -}} +apiVersion: v1 +kind: Service +metadata: +{{- if .Values.nodeplugin.httpMetrics.service.annotations }} + annotations: +{{ toYaml .Values.nodeplugin.httpMetrics.service.annotations | indent 4 }} +{{- end }} + name: {{ include "ceph-csi-cephfs.nodeplugin.fullname" . }}-http-metrics + namespace: {{ .Release.Namespace }} + labels: + app: {{ include "ceph-csi-cephfs.fullname" . }} + chart: {{ include "ceph-csi-cephfs.chart" . }} + component: {{ .Values.nodeplugin.name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: +{{- if .Values.nodeplugin.httpMetrics.service.clusterIP }} + clusterIP: "{{ .Values.nodeplugin.httpMetrics.service.clusterIP }}" +{{- end }} +{{- if .Values.nodeplugin.httpMetrics.service.externalIPs }} + externalIPs: +{{ toYaml .Values.nodeplugin.httpMetrics.service.externalIPs | indent 4 }} +{{- end }} +{{- if .Values.nodeplugin.httpMetrics.service.loadBalancerIP }} + loadBalancerIP: "{{ .Values.nodeplugin.httpMetrics.service.loadBalancerIP }}" +{{- end }} +{{- if .Values.nodeplugin.httpMetrics.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: +{{ toYaml .Values.nodeplugin.httpMetrics.service.loadBalancerSourceRanges | indent 4 }} +{{- end }} + ports: + - name: http-metrics + port: {{ .Values.nodeplugin.httpMetrics.service.servicePort }} + targetPort: {{ .Values.nodeplugin.httpMetrics.containerPort }} + selector: + app: {{ include "ceph-csi-cephfs.name" . }} + component: {{ .Values.nodeplugin.name }} + release: {{ .Release.Name }} + type: "{{ .Values.nodeplugin.httpMetrics.service.type }}" +{{- end -}} diff --git a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/nodeplugin-rules-clusterrole.yaml b/charts/ceph-csi-cephfs/templates/nodeplugin-rules-clusterrole.yaml similarity index 100% rename from deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/nodeplugin-rules-clusterrole.yaml rename to charts/ceph-csi-cephfs/templates/nodeplugin-rules-clusterrole.yaml diff --git a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/nodeplugin-serviceaccount.yaml b/charts/ceph-csi-cephfs/templates/nodeplugin-serviceaccount.yaml similarity index 100% rename from deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/nodeplugin-serviceaccount.yaml rename to charts/ceph-csi-cephfs/templates/nodeplugin-serviceaccount.yaml diff --git a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/provisioner-clusterrole.yaml b/charts/ceph-csi-cephfs/templates/provisioner-clusterrole.yaml similarity index 100% rename from deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/provisioner-clusterrole.yaml rename to charts/ceph-csi-cephfs/templates/provisioner-clusterrole.yaml diff --git a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/provisioner-clusterrolebinding.yaml b/charts/ceph-csi-cephfs/templates/provisioner-clusterrolebinding.yaml similarity index 100% rename from deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/provisioner-clusterrolebinding.yaml rename to charts/ceph-csi-cephfs/templates/provisioner-clusterrolebinding.yaml diff --git a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-deployment.yaml b/charts/ceph-csi-cephfs/templates/provisioner-deployment.yaml similarity index 74% rename from deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-deployment.yaml rename to charts/ceph-csi-cephfs/templates/provisioner-deployment.yaml index 8f9988d5d..d69c9682b 100644 --- a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-deployment.yaml +++ b/charts/ceph-csi-cephfs/templates/provisioner-deployment.yaml @@ -1,3 +1,4 @@ +{{- if semverCompare ">=1.14" .Capabilities.KubeVersion.GitVersion -}} kind: Deployment apiVersion: apps/v1 metadata: @@ -29,22 +30,22 @@ spec: containers: - name: csi-provisioner image: "{{ .Values.provisioner.provisioner.image.repository }}:{{ .Values.provisioner.provisioner.image.tag }}" + imagePullPolicy: {{ .Values.provisioner.provisioner.image.pullPolicy }} args: - "--csi-address=$(ADDRESS)" - "--v=5" - - "--timeout=60s" + - "--timeout={{ .Values.provisioner.timeout }}" - "--enable-leader-election=true" - "--leader-election-type=leases" - "--retry-interval-start=500ms" env: - name: ADDRESS - value: "{{ .Values.socketDir }}/{{ .Values.socketFile }}" - imagePullPolicy: {{ .Values.provisioner.provisioner.image.pullPolicy }} + value: "unix:///csi/{{ .Values.provisionerSocketFile }}" volumeMounts: - name: socket-dir - mountPath: {{ .Values.socketDir }} + mountPath: /csi resources: -{{ toYaml .Values.provisioner.resources | indent 12 }} +{{ toYaml .Values.provisioner.provisioner.resources | indent 12 }} {{- if .Values.provisioner.attacher.enabled }} - name: csi-attacher image: "{{ .Values.provisioner.attacher.image.repository }}:{{ .Values.provisioner.attacher.image.tag }}" @@ -52,36 +53,34 @@ spec: args: - "--v=5" - "--csi-address=$(ADDRESS)" - - "leader-election=true" + - "--leader-election=true" - "--leader-election-type=leases" env: - name: ADDRESS - value: "{{ .Values.socketDir }}/{{ .Values.socketFile }}" + value: "unix:///csi/{{ .Values.provisionerSocketFile }}" volumeMounts: - name: socket-dir - mountPath: {{ .Values.socketDir }} + mountPath: /csi resources: {{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }} {{- end }} - name: csi-cephfsplugin - securityContext: - privileged: true - capabilities: - add: ["SYS_ADMIN"] - allowPrivilegeEscalation: true image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}" - args : + imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} + args: - "--nodeid=$(NODE_ID)" - "--type=cephfs" - "--controllerserver=true" + - "--pidlimit=-1" +{{- if .Values.provisioner.grpcMetrics.enabled }} + - "--metricsport={{ .Values.nodeplugin.grpcMetrics.containerPort }}" + - "--metricspath=/metrics" + - "--enablegrpcmetrics=true" +{{- end }} - "--endpoint=$(CSI_ENDPOINT)" - "--v=5" - "--drivername=$(DRIVER_NAME)" - "--metadatastorage=k8s_configmap" - - "--pidlimit=-1" - - "--metricsport=8091" - - "--metricspath=/metrics" - - "--enablegrpcmetrics=false" env: - name: POD_IP valueFrom: @@ -93,49 +92,71 @@ spec: valueFrom: fieldRef: fieldPath: spec.nodeName + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace - name: CSI_ENDPOINT - value: "unix:/{{ .Values.socketDir }}/{{ .Values.socketFile }}" - imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} + value: "unix:///csi/{{ .Values.provisionerSocketFile }}" + securityContext: + privileged: true + capabilities: + add: ["SYS_ADMIN"] + allowPrivilegeEscalation: true volumeMounts: - name: socket-dir - mountPath: {{ .Values.socketDir }} - - name: host-rootfs - mountPath: "/rootfs" + mountPath: /csi + - name: host-sys + mountPath: /sys + - name: lib-modules + mountPath: /lib/modules + readOnly: true + - name: host-dev + mountPath: /dev - name: ceph-csi-config mountPath: /etc/ceph-csi-config/ - name: keys-tmp-dir mountPath: /tmp/csi/keys resources: {{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }} +{{- if .Values.provisioner.httpMetrics.enabled }} - name: liveness-prometheus image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}" + imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} args: - "--type=liveness" - "--endpoint=$(CSI_ENDPOINT)" - - "--metricsport=8081" + - "--metricsport={{ .Values.provisioner.httpMetrics.containerPort }}" - "--metricspath=/metrics" - "--polltime=60s" - "--timeout=3s" - imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} env: - name: CSI_ENDPOINT - value: "unix:/{{ .Values.socketDir }}/{{ .Values.socketFile }}" + value: "unix:///csi/{{ .Values.provisionerSocketFile }}" - name: POD_IP valueFrom: fieldRef: fieldPath: status.podIP volumeMounts: - name: socket-dir - mountPath: {{ .Values.socketDir }} + mountPath: /csi resources: {{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }} +{{- end }} volumes: - name: socket-dir - emptyDir: {} -#FIXME this seems way too much. Why is it needed at all for this? - - name: host-rootfs hostPath: - path: / + path: {{ .Values.socketDir }} + type: DirectoryOrCreate + - name: host-sys + hostPath: + path: /sys + - name: lib-modules + hostPath: + path: /lib/modules + - name: host-dev + hostPath: + path: /dev - name: ceph-csi-config configMap: name: {{ .Values.configMapName | quote }} @@ -155,3 +176,4 @@ spec: tolerations: {{ toYaml .Values.provisioner.tolerations | indent 8 -}} {{- end -}} +{{- end -}} diff --git a/charts/ceph-csi-cephfs/templates/provisioner-grpc-service.yaml b/charts/ceph-csi-cephfs/templates/provisioner-grpc-service.yaml new file mode 100644 index 000000000..eacb88875 --- /dev/null +++ b/charts/ceph-csi-cephfs/templates/provisioner-grpc-service.yaml @@ -0,0 +1,41 @@ +{{- if .Values.provisioner.grpcMetrics.service.enabled -}} +apiVersion: v1 +kind: Service +metadata: +{{- if .Values.provisioner.grpcMetrics.service.annotations }} + annotations: +{{ toYaml .Values.provisioner.grpcMetrics.service.annotations | indent 4 }} +{{- end }} + name: {{ include "ceph-csi-cephfs.provisioner.fullname" . }}-grpc-metrics + namespace: {{ .Release.Namespace }} + labels: + app: {{ include "ceph-csi-cephfs.fullname" . }} + chart: {{ include "ceph-csi-cephfs.chart" . }} + component: {{ .Values.provisioner.name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: +{{- if .Values.provisioner.grpcMetrics.service.clusterIP }} + clusterIP: "{{ .Values.provisioner.grpcMetrics.service.clusterIP }}" +{{- end }} +{{- if .Values.provisioner.grpcMetrics.service.externalIPs }} + externalIPs: +{{ toYaml .Values.provisioner.grpcMetrics.service.externalIPs | indent 4 }} +{{- end }} +{{- if .Values.provisioner.grpcMetrics.service.loadBalancerIP }} + loadBalancerIP: "{{ .Values.provisioner.grpcMetrics.service.loadBalancerIP }}" +{{- end }} +{{- if .Values.provisioner.grpcMetrics.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: +{{ toYaml .Values.provisioner.grpcMetrics.service.loadBalancerSourceRanges | indent 4 }} +{{- end }} + ports: + - name: grpc-metrics + port: {{ .Values.provisioner.grpcMetrics.service.servicePort }} + targetPort: {{ .Values.provisioner.grpcMetrics.containerPort }} + selector: + app: {{ include "ceph-csi-cephfs.name" . }} + component: {{ .Values.provisioner.name }} + release: {{ .Release.Name }} + type: "{{ .Values.provisioner.grpcMetrics.service.type }}" +{{- end -}} diff --git a/charts/ceph-csi-cephfs/templates/provisioner-http-service.yaml b/charts/ceph-csi-cephfs/templates/provisioner-http-service.yaml new file mode 100644 index 000000000..548324242 --- /dev/null +++ b/charts/ceph-csi-cephfs/templates/provisioner-http-service.yaml @@ -0,0 +1,41 @@ +{{- if .Values.provisioner.httpMetrics.service.enabled -}} +apiVersion: v1 +kind: Service +metadata: +{{- if .Values.provisioner.httpMetrics.service.annotations }} + annotations: +{{ toYaml .Values.provisioner.httpMetrics.service.annotations | indent 4 }} +{{- end }} + name: {{ include "ceph-csi-cephfs.provisioner.fullname" . }}-http-metrics + namespace: {{ .Release.Namespace }} + labels: + app: {{ include "ceph-csi-cephfs.fullname" . }} + chart: {{ include "ceph-csi-cephfs.chart" . }} + component: {{ .Values.provisioner.name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: +{{- if .Values.provisioner.httpMetrics.service.clusterIP }} + clusterIP: "{{ .Values.provisioner.httpMetrics.service.clusterIP }}" +{{- end }} +{{- if .Values.provisioner.httpMetrics.service.externalIPs }} + externalIPs: +{{ toYaml .Values.provisioner.httpMetrics.service.externalIPs | indent 4 }} +{{- end }} +{{- if .Values.provisioner.httpMetrics.service.loadBalancerIP }} + loadBalancerIP: "{{ .Values.provisioner.httpMetrics.service.loadBalancerIP }}" +{{- end }} +{{- if .Values.provisioner.httpMetrics.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: +{{ toYaml .Values.provisioner.httpMetrics.service.loadBalancerSourceRanges | indent 4 }} +{{- end }} + ports: + - name: http-metrics + port: {{ .Values.provisioner.httpMetrics.service.servicePort }} + targetPort: {{ .Values.provisioner.httpMetrics.containerPort }} + selector: + app: {{ include "ceph-csi-cephfs.name" . }} + component: {{ .Values.provisioner.name }} + release: {{ .Release.Name }} + type: "{{ .Values.provisioner.httpMetrics.service.type }}" +{{- end -}} diff --git a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-role.yaml b/charts/ceph-csi-cephfs/templates/provisioner-role.yaml similarity index 90% rename from deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-role.yaml rename to charts/ceph-csi-cephfs/templates/provisioner-role.yaml index c169f9bfd..c2df829f7 100644 --- a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-role.yaml +++ b/charts/ceph-csi-cephfs/templates/provisioner-role.yaml @@ -17,7 +17,9 @@ rules: - apiGroups: [""] resources: ["configmaps"] verbs: ["get", "list", "watch", "create", "delete"] +{{- if semverCompare ">=1.14" .Capabilities.KubeVersion.GitVersion }} - apiGroups: ["coordination.k8s.io"] resources: ["leases"] verbs: ["get", "watch", "list", "delete", "update", "create"] {{- end -}} +{{- end -}} diff --git a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/provisioner-rolebinding.yaml b/charts/ceph-csi-cephfs/templates/provisioner-rolebinding.yaml similarity index 100% rename from deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/provisioner-rolebinding.yaml rename to charts/ceph-csi-cephfs/templates/provisioner-rolebinding.yaml diff --git a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/provisioner-rules-clusterrole.yaml b/charts/ceph-csi-cephfs/templates/provisioner-rules-clusterrole.yaml similarity index 91% rename from deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/provisioner-rules-clusterrole.yaml rename to charts/ceph-csi-cephfs/templates/provisioner-rules-clusterrole.yaml index 6356851ad..cde4edb2b 100644 --- a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/provisioner-rules-clusterrole.yaml +++ b/charts/ceph-csi-cephfs/templates/provisioner-rules-clusterrole.yaml @@ -32,9 +32,9 @@ rules: - apiGroups: ["csi.storage.k8s.io"] resources: ["csinodeinfos"] verbs: ["get", "list", "watch"] -{{ if .Values.provisioner.attacher.enabled }} +{{- if .Values.provisioner.attacher.enabled }} - apiGroups: ["storage.k8s.io"] resources: ["volumeattachments"] - verbs: ["get", "list", "watch", "update"] -{{ end }} + verbs: ["get", "list", "watch", "update", "patch"] +{{- end -}} {{- end -}} diff --git a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/provisioner-service.yaml b/charts/ceph-csi-cephfs/templates/provisioner-service.yaml similarity index 88% rename from deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/provisioner-service.yaml rename to charts/ceph-csi-cephfs/templates/provisioner-service.yaml index 65247935d..2af7abbf4 100644 --- a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/provisioner-service.yaml +++ b/charts/ceph-csi-cephfs/templates/provisioner-service.yaml @@ -1,3 +1,4 @@ +{{- if semverCompare "<=1.13" .Capabilities.KubeVersion.GitVersion -}} kind: Service apiVersion: v1 metadata: @@ -23,3 +24,4 @@ spec: port: 8090 protocol: TCP targetPort: 8091 +{{- end -}} diff --git a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/provisioner-serviceaccount.yaml b/charts/ceph-csi-cephfs/templates/provisioner-serviceaccount.yaml similarity index 100% rename from deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/provisioner-serviceaccount.yaml rename to charts/ceph-csi-cephfs/templates/provisioner-serviceaccount.yaml diff --git a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/provisioner-statefulset.yaml b/charts/ceph-csi-cephfs/templates/provisioner-statefulset.yaml similarity index 74% rename from deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/provisioner-statefulset.yaml rename to charts/ceph-csi-cephfs/templates/provisioner-statefulset.yaml index 955c16566..919e2284e 100644 --- a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/provisioner-statefulset.yaml +++ b/charts/ceph-csi-cephfs/templates/provisioner-statefulset.yaml @@ -1,3 +1,4 @@ +{{- if semverCompare "<=1.13" .Capabilities.KubeVersion.GitVersion -}} kind: StatefulSet apiVersion: apps/v1 metadata: @@ -11,7 +12,7 @@ metadata: heritage: {{ .Release.Service }} spec: serviceName: {{ include "ceph-csi-cephfs.provisioner.fullname" . }} - replicas: {{ .Values.provisioner.replicaCount }} + replicas: 1 selector: matchLabels: app: {{ include "ceph-csi-cephfs.name" . }} @@ -25,6 +26,7 @@ spec: component: {{ .Values.provisioner.name }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} + contains: liveness spec: serviceAccountName: {{ include "ceph-csi-cephfs.serviceAccountName.provisioner" . }} containers: @@ -34,16 +36,16 @@ spec: args: - "--csi-address=$(ADDRESS)" - "--v=5" - - "--timeout=60s" + - "--timeout={{ .Values.provisioner.timeout }}" - "--retry-interval-start=500ms" env: - name: ADDRESS - value: "{{ .Values.socketDir }}/{{ .Values.socketFile }}" + value: "unix:///csi/{{ .Values.provisionerSocketFile }}" volumeMounts: - name: socket-dir - mountPath: {{ .Values.socketDir }} + mountPath: /csi resources: -{{ toYaml .Values.provisioner.resources | indent 12 }} +{{ toYaml .Values.provisioner.provisioner.resources | indent 12 }} {{- if .Values.provisioner.attacher.enabled }} - name: csi-attacher image: "{{ .Values.provisioner.attacher.image.repository }}:{{ .Values.provisioner.attacher.image.tag }}" @@ -53,33 +55,29 @@ spec: - "--csi-address=$(ADDRESS)" env: - name: ADDRESS - value: "{{ .Values.socketDir }}/{{ .Values.socketFile }}" + value: "unix:///csi/{{ .Values.provisionerSocketFile }}" volumeMounts: - name: socket-dir - mountPath: {{ .Values.socketDir }} + mountPath: /csi resources: {{ toYaml .Values.provisioner.attacher.resources | indent 12 }} {{- end }} - name: csi-cephfsplugin - securityContext: - privileged: true - capabilities: - add: ["SYS_ADMIN"] - allowPrivilegeEscalation: true image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}" imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} - args : + args: - "--nodeid=$(NODE_ID)" - "--type=cephfs" - "--controllerserver=true" + - "--pidlimit=-1" +{{- if .Values.provisioner.grpcMetrics.enabled }} + - "--metricsport={{ .Values.nodeplugin.grpcMetrics.containerPort }}" + - "--metricspath=/metrics" + - "--enablegrpcmetrics=true" +{{- end }} - "--endpoint=$(CSI_ENDPOINT)" - "--v=5" - "--drivername=$(DRIVER_NAME)" - - "--metadatastorage=k8s_configmap" - - "--pidlimit=-1" - - "--metricsport=8091" - - "--metricspath=/metrics" - - "--enablegrpcmetrics=false" env: - name: POD_IP valueFrom: @@ -91,48 +89,71 @@ spec: valueFrom: fieldRef: fieldPath: spec.nodeName + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace - name: CSI_ENDPOINT - value: "unix:/{{ .Values.socketDir }}/{{ .Values.socketFile }}" + value: "unix:///csi/{{ .Values.provisionerSocketFile }}" + securityContext: + privileged: true + capabilities: + add: ["SYS_ADMIN"] + allowPrivilegeEscalation: true volumeMounts: - name: socket-dir - mountPath: {{ .Values.socketDir }} - - name: host-rootfs - mountPath: "/rootfs" + mountPath: /csi + - name: host-sys + mountPath: /sys + - name: lib-modules + mountPath: /lib/modules + readOnly: true + - name: host-dev + mountPath: /dev - name: ceph-csi-config mountPath: /etc/ceph-csi-config/ - name: keys-tmp-dir mountPath: /tmp/csi/keys resources: {{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }} +{{- if .Values.provisioner.httpMetrics.enabled }} - name: liveness-prometheus image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}" + imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} args: - "--type=liveness" - "--endpoint=$(CSI_ENDPOINT)" - - "--metricsport=8081" + - "--metricsport={{ .Values.provisioner.httpMetrics.containerPort }}" - "--metricspath=/metrics" - "--polltime=60s" - "--timeout=3s" - imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} env: - name: CSI_ENDPOINT - value: "unix:/{{ .Values.socketDir }}/{{ .Values.socketFile }}" + value: "unix:///csi/{{ .Values.provisionerSocketFile }}" - name: POD_IP valueFrom: fieldRef: fieldPath: status.podIP volumeMounts: - name: socket-dir - mountPath: {{ .Values.socketDir }} + mountPath: /csi resources: {{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }} +{{- end }} volumes: - name: socket-dir - emptyDir: {} -#FIXME this seems way too much. Why is it needed at all for this? - - name: host-rootfs hostPath: - path: / + path: {{ .Values.socketDir }} + type: DirectoryOrCreate + - name: host-sys + hostPath: + path: /sys + - name: lib-modules + hostPath: + path: /lib/modules + - name: host-dev + hostPath: + path: /dev - name: ceph-csi-config configMap: name: {{ .Values.configMapName | quote }} @@ -152,3 +173,4 @@ spec: tolerations: {{ toYaml .Values.provisioner.tolerations | indent 8 -}} {{- end -}} +{{- end -}} diff --git a/charts/ceph-csi-cephfs/values.yaml b/charts/ceph-csi-cephfs/values.yaml new file mode 100644 index 000000000..b7c2e2c32 --- /dev/null +++ b/charts/ceph-csi-cephfs/values.yaml @@ -0,0 +1,224 @@ +--- +rbac: + # Specifies whether RBAC resources should be created + create: true + +serviceAccounts: + nodeplugin: + # Specifies whether a ServiceAccount should be created + create: true + # The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname + name: + provisioner: + # Specifies whether a ServiceAccount should be created + create: true + # The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname + name: + +# Configuration for the CSI to connect to the cluster +# Ref: https://github.com/ceph/ceph-csi/blob/master/examples/README.md +# Example: +# csiConfig: +# - clusterID: "" +# monitors: +# - "" +# - "" +csiConfig: [] + +nodeplugin: + name: nodeplugin + + httpMetrics: + # Metrics only available for cephcis/cephsi => 1.2.0 + # Specifies whether http metrics should be exposed + enabled: true + # The port of the container to expose the metrics + containerPort: 8081 + + service: + # Specifies whether a service should be created fot the metrics + enabled: true + # The port to use for the service + servicePort: 8080 + type: ClusterIP + + # Annotations for the service + # Example: + # annotations: + # prometheus.io/scrape: "true" + # prometheus.io/port: "9080" + annotations: {} + + clusterIP: "" + + ## List of IP addresses at which the stats-exporter service is available + ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips + ## + externalIPs: [] + + loadBalancerIP: "" + loadBalancerSourceRanges: [] + + grpcMetrics: + # Metrics only available for cephcis/cephsi => 1.2.0 + # Specifies whether grpc metrics should be exposed + enabled: true + # The port of the container to expose the metrics + containerPort: 8091 + + service: + # Specifies whether a service should be created fot the metrics + enabled: true + # The port to use for the service + servicePort: 8090 + type: ClusterIP + + # Annotations for the service + # Example: + # annotations: + # prometheus.io/scrape: "true" + # prometheus.io/port: "9090" + annotations: {} + + clusterIP: "" + + ## List of IP addresses at which the stats-exporter service is available + ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips + ## + externalIPs: [] + + loadBalancerIP: "" + loadBalancerSourceRanges: [] + + registrar: + image: + repository: quay.io/k8scsi/csi-node-driver-registrar + tag: v1.1.0 + pullPolicy: IfNotPresent + resources: {} + + plugin: + image: + repository: quay.io/cephcsi/cephcsi + tag: canary + pullPolicy: IfNotPresent + resources: {} + + nodeSelector: {} + + tolerations: [] + + affinity: {} + +provisioner: + name: provisioner + # When using Kubernetes <1.14 this value is ignored + # The statefulset is deployed with replicas: 1 + replicaCount: 3 + # Timeout for waiting for creation or deletion of a volume + timeout: 60s + + httpMetrics: + # Metrics only available for cephcsi/cephcsi => 1.2.0 + # Specifies whether http metrics should be exposed + enabled: true + # The port of the container to expose the metrics + containerPort: 8081 + + service: + # Specifies whether a service should be created fot the metrics + enabled: true + # The port to use for the service + servicePort: 8080 + type: ClusterIP + + # Annotations for the service + # Example: + # annotations: + # prometheus.io/scrape: "true" + # prometheus.io/port: "9080" + annotations: {} + + clusterIP: "" + + ## List of IP addresses at which the stats-exporter service is available + ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips + ## + externalIPs: [] + + loadBalancerIP: "" + loadBalancerSourceRanges: [] + + grpcMetrics: + # Metrics only available for cephcsi/cephcsi => 1.2.0 + # Specifies whether grpc metrics should be exposed + enabled: true + # The port of the container to expose the metrics + containerPort: 8091 + + service: + # Specifies whether a service should be created fot the metrics + enabled: true + # The port to use for the service + servicePort: 8090 + type: ClusterIP + + # Annotations for the service + # Example: + # annotations: + # prometheus.io/scrape: "true" + # prometheus.io/port: "9090" + annotations: {} + + clusterIP: "" + + ## List of IP addresses at which the stats-exporter service is available + ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips + ## + externalIPs: [] + + loadBalancerIP: "" + loadBalancerSourceRanges: [] + + provisioner: + image: + repository: quay.io/k8scsi/csi-provisioner + tag: v1.3.0 + pullPolicy: IfNotPresent + resources: {} + + attacher: + name: attacher + enabled: true + image: + repository: quay.io/k8scsi/csi-attacher + tag: v1.2.1 + pullPolicy: IfNotPresent + resources: {} + + nodeSelector: {} + + tolerations: [] + + affinity: {} + +######################################################### +# Variables for 'internal' use please use with caution! # +######################################################### + +# The directory where the provisioner and pluginSocketFile will be mounted +socketDir: /var/lib/kubelet/plugins/cephfs.csi.ceph.com +# The filename of the provisioner socket +provisionerSocketFile: csi-provisioner.sock +# The filename of the plugin socket +pluginSocketFile: csi.sock +# The directory where nodeplugin socket is created +registrationDir: /var/lib/kubelet/plugins_registry +# The nodeplugin plugins directory +pluginDir: /var/lib/kubelet/plugins +# Name of the csi-driver +driverName: cephfs.csi.ceph.com +# Name of the configmap used for state +configMapName: ceph-csi-config-cephfs diff --git a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/.helmignore b/charts/ceph-csi-rbd/.helmignore similarity index 100% rename from deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/.helmignore rename to charts/ceph-csi-rbd/.helmignore diff --git a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/Chart.yaml b/charts/ceph-csi-rbd/Chart.yaml similarity index 74% rename from deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/Chart.yaml rename to charts/ceph-csi-rbd/Chart.yaml index 24ad602f6..1e92dbf52 100644 --- a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/Chart.yaml +++ b/charts/ceph-csi-rbd/Chart.yaml @@ -1,15 +1,15 @@ --- apiVersion: v1 -appVersion: "1.3.0" +appVersion: canary description: "Container Storage Interface (CSI) driver, provisioner, snapshotter, and attacher for Ceph RBD" name: ceph-csi-rbd -version: 0.9.0 +version: 1.3.0-canary keywords: - ceph - rbd - ceph-csi home: https://github.com/ceph/ceph-csi sources: - - https://github.com/ceph/ceph-csi/tree/csi-v1.0/deploy/rbd/helm + - https://github.com/ceph/ceph-csi/tree/master/charts/ceph-csi-rbd icon: https://raw.githubusercontent.com/ceph/ceph-csi/master/assets/ceph-logo.png diff --git a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/README.md b/charts/ceph-csi-rbd/README.md similarity index 100% rename from deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/README.md rename to charts/ceph-csi-rbd/README.md diff --git a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/NOTES.txt b/charts/ceph-csi-rbd/templates/NOTES.txt similarity index 100% rename from deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/NOTES.txt rename to charts/ceph-csi-rbd/templates/NOTES.txt diff --git a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/_helpers.tpl b/charts/ceph-csi-rbd/templates/_helpers.tpl similarity index 100% rename from deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/_helpers.tpl rename to charts/ceph-csi-rbd/templates/_helpers.tpl diff --git a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/csidriver-crd.yaml b/charts/ceph-csi-rbd/templates/csidriver-crd.yaml similarity index 74% rename from deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/csidriver-crd.yaml rename to charts/ceph-csi-rbd/templates/csidriver-crd.yaml index 8bdb83c4a..aaef955df 100644 --- a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/csidriver-crd.yaml +++ b/charts/ceph-csi-rbd/templates/csidriver-crd.yaml @@ -1,5 +1,4 @@ ---- -{{ if not .Values.provisioner.attacher.enabled }} +{{- if not .Values.provisioner.attacher.enabled -}} apiVersion: storage.k8s.io/v1beta1 kind: CSIDriver metadata: @@ -8,4 +7,4 @@ metadata: spec: attachRequired: false podInfoOnMount: false -{{ end }} +{{- end -}} diff --git a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/csiplugin-configmap.yaml b/charts/ceph-csi-rbd/templates/csiplugin-configmap.yaml similarity index 89% rename from deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/csiplugin-configmap.yaml rename to charts/ceph-csi-rbd/templates/csiplugin-configmap.yaml index 80ec5057b..bfc366b3e 100644 --- a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/csiplugin-configmap.yaml +++ b/charts/ceph-csi-rbd/templates/csiplugin-configmap.yaml @@ -1,4 +1,3 @@ ---- apiVersion: v1 kind: ConfigMap metadata: @@ -12,4 +11,4 @@ metadata: heritage: {{ .Release.Service }} data: config.json: |- - [] +{{ toJson .Values.csiConfig | indent 4 -}} diff --git a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/nodeplugin-clusterrole.yaml b/charts/ceph-csi-rbd/templates/nodeplugin-clusterrole.yaml similarity index 100% rename from deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/nodeplugin-clusterrole.yaml rename to charts/ceph-csi-rbd/templates/nodeplugin-clusterrole.yaml diff --git a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/nodeplugin-clusterrolebinding.yaml b/charts/ceph-csi-rbd/templates/nodeplugin-clusterrolebinding.yaml similarity index 100% rename from deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/nodeplugin-clusterrolebinding.yaml rename to charts/ceph-csi-rbd/templates/nodeplugin-clusterrolebinding.yaml diff --git a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml b/charts/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml similarity index 80% rename from deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml rename to charts/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml index e1cbcc8ff..40086af7d 100644 --- a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml +++ b/charts/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml @@ -35,24 +35,28 @@ spec: containers: - name: driver-registrar image: "{{ .Values.nodeplugin.registrar.image.repository }}:{{ .Values.nodeplugin.registrar.image.tag }}" + imagePullPolicy: {{ .Values.nodeplugin.registrar.image.pullPolicy }} args: - "--v=5" - - "--csi-address=/csi/{{ .Values.socketFile }}" - - "--kubelet-registration-path={{ .Values.socketDir }}/{{ .Values.socketFile }}" + - "--csi-address=/csi/{{ .Values.pluginSocketFile }}" + - "--kubelet-registration-path={{ .Values.socketDir }}/{{ .Values.pluginSocketFile }}" lifecycle: preStop: exec: - command: [ - "/bin/sh", "-c", - 'rm -rf /registration/{{ .Values.driverName }} - /registration/{{ .Values.driverName }}-reg.sock' - ] + {{- /* + NOTE(wilmardo): The replace functions ensures there are no spaces in the string. + To avoid `rm -rf /registration/driver name` + */}} + command: [ + "/bin/sh", "-c", + "rm -rf /registration/{{ .Values.driverName | replace " " "" }} \ + /registration/{{ .Values.driverName | replace " " "" }}-reg.sock" + ] env: - name: KUBE_NODE_NAME valueFrom: fieldRef: fieldPath: spec.nodeName - imagePullPolicy: {{ .Values.nodeplugin.registrar.image.pullPolicy }} volumeMounts: - name: socket-dir mountPath: /csi @@ -61,22 +65,21 @@ spec: resources: {{ toYaml .Values.nodeplugin.registrar.resources | indent 12 }} - name: csi-rbdplugin - securityContext: - privileged: true - capabilities: - add: ["SYS_ADMIN"] - allowPrivilegeEscalation: true image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}" - args : + imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} + args: - "--nodeid=$(NODE_ID)" - "--type=rbd" - "--nodeserver=true" + - "--pidlimit=-1" +{{- if .Values.nodeplugin.grpcMetrics.enabled }} + - "--metricsport={{ .Values.nodeplugin.grpcMetrics.containerPort }}" + - "--metricspath=/metrics" + - "--enablegrpcmetrics=true" +{{- end }} - "--endpoint=$(CSI_ENDPOINT)" - "--v=5" - "--drivername=$(DRIVER_NAME)" - - "--metricsport=8090" - - "--metricspath=/metrics" - - "--enablegrpcmetrics=false" env: - name: POD_IP valueFrom: @@ -84,22 +87,24 @@ spec: fieldPath: status.podIP - name: DRIVER_NAME value: {{ .Values.driverName }} + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace - name: NODE_ID valueFrom: fieldRef: fieldPath: spec.nodeName - name: CSI_ENDPOINT - value: "unix:/{{ .Values.socketDir }}/{{ .Values.socketFile }}" - imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} + value: "unix:///csi/{{ .Values.pluginSocketFile }}" + securityContext: + privileged: true + capabilities: + add: ["SYS_ADMIN"] + allowPrivilegeEscalation: true volumeMounts: - name: socket-dir - mountPath: {{ .Values.socketDir }} - - name: plugin-dir - mountPath: {{ .Values.pluginDir }} - mountPropagation: "Bidirectional" - - name: mountpoint-dir - mountPath: /var/lib/kubelet/pods - mountPropagation: "Bidirectional" + mountPath: /csi - mountPath: /dev name: host-dev - mountPath: /sys @@ -109,32 +114,40 @@ spec: readOnly: true - name: ceph-csi-config mountPath: /etc/ceph-csi-config/ + - name: plugin-dir + mountPath: /var/lib/kubelet/plugins + mountPropagation: "Bidirectional" + - name: mountpoint-dir + mountPath: /var/lib/kubelet/pods + mountPropagation: "Bidirectional" - name: keys-tmp-dir mountPath: /tmp/csi/keys resources: {{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }} +{{- if .Values.nodeplugin.httpMetrics.enabled }} - name: liveness-prometheus image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}" + imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} args: - "--type=liveness" - "--endpoint=$(CSI_ENDPOINT)" - - "--metricsport=8080" + - "--metricsport={{ .Values.nodeplugin.httpMetrics.containerPort }}" - "--metricspath=/metrics" - "--polltime=60s" - "--timeout=3s" - imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} env: - name: CSI_ENDPOINT - value: "unix:/{{ .Values.socketDir }}/{{ .Values.socketFile }}" + value: "unix:///csi/{{ .Values.pluginSocketFile }}" - name: POD_IP valueFrom: fieldRef: fieldPath: status.podIP volumeMounts: - - name: plugin-dir - mountPath: {{ .Values.socketDir }} + - name: socket-dir + mountPath: /csi resources: {{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }} +{{- end }} volumes: - name: socket-dir hostPath: diff --git a/charts/ceph-csi-rbd/templates/nodeplugin-grpc-service.yaml b/charts/ceph-csi-rbd/templates/nodeplugin-grpc-service.yaml new file mode 100644 index 000000000..39e9cf984 --- /dev/null +++ b/charts/ceph-csi-rbd/templates/nodeplugin-grpc-service.yaml @@ -0,0 +1,41 @@ +{{- if .Values.nodeplugin.grpcMetrics.service.enabled -}} +apiVersion: v1 +kind: Service +metadata: +{{- if .Values.nodeplugin.grpcMetrics.service.annotations }} + annotations: +{{ toYaml .Values.nodeplugin.grpcMetrics.service.annotations | indent 4 }} +{{- end }} + name: {{ include "ceph-csi-rbd.nodeplugin.fullname" . }}-grpc-metrics + namespace: {{ .Release.Namespace }} + labels: + app: {{ include "ceph-csi-rbd.fullname" . }} + chart: {{ include "ceph-csi-rbd.chart" . }} + component: {{ .Values.nodeplugin.name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: +{{- if .Values.nodeplugin.grpcMetrics.service.clusterIP }} + clusterIP: "{{ .Values.nodeplugin.grpcMetrics.service.clusterIP }}" +{{- end }} +{{- if .Values.nodeplugin.grpcMetrics.service.externalIPs }} + externalIPs: +{{ toYaml .Values.nodeplugin.grpcMetrics.service.externalIPs | indent 4 }} +{{- end }} +{{- if .Values.nodeplugin.grpcMetrics.service.loadBalancerIP }} + loadBalancerIP: "{{ .Values.nodeplugin.grpcMetrics.service.loadBalancerIP }}" +{{- end }} +{{- if .Values.nodeplugin.grpcMetrics.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: +{{ toYaml .Values.nodeplugin.grpcMetrics.service.loadBalancerSourceRanges | indent 4 }} +{{- end }} + ports: + - name: grpc-metrics + port: {{ .Values.nodeplugin.grpcMetrics.service.servicePort }} + targetPort: {{ .Values.nodeplugin.grpcMetrics.containerPort }} + selector: + app: {{ include "ceph-csi-rbd.name" . }} + component: {{ .Values.nodeplugin.name }} + release: {{ .Release.Name }} + type: "{{ .Values.nodeplugin.grpcMetrics.service.type }}" +{{- end -}} diff --git a/charts/ceph-csi-rbd/templates/nodeplugin-http-service.yaml b/charts/ceph-csi-rbd/templates/nodeplugin-http-service.yaml new file mode 100644 index 000000000..68a3942e8 --- /dev/null +++ b/charts/ceph-csi-rbd/templates/nodeplugin-http-service.yaml @@ -0,0 +1,41 @@ +{{- if .Values.nodeplugin.httpMetrics.service.enabled -}} +apiVersion: v1 +kind: Service +metadata: +{{- if .Values.nodeplugin.httpMetrics.service.annotations }} + annotations: +{{ toYaml .Values.nodeplugin.httpMetrics.service.annotations | indent 4 }} +{{- end }} + name: {{ include "ceph-csi-rbd.nodeplugin.fullname" . }}-http-metrics + namespace: {{ .Release.Namespace }} + labels: + app: {{ include "ceph-csi-rbd.fullname" . }} + chart: {{ include "ceph-csi-rbd.chart" . }} + component: {{ .Values.nodeplugin.name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: +{{- if .Values.nodeplugin.httpMetrics.service.clusterIP }} + clusterIP: "{{ .Values.nodeplugin.httpMetrics.service.clusterIP }}" +{{- end }} +{{- if .Values.nodeplugin.httpMetrics.service.externalIPs }} + externalIPs: +{{ toYaml .Values.nodeplugin.httpMetrics.service.externalIPs | indent 4 }} +{{- end }} +{{- if .Values.nodeplugin.httpMetrics.service.loadBalancerIP }} + loadBalancerIP: "{{ .Values.nodeplugin.httpMetrics.service.loadBalancerIP }}" +{{- end }} +{{- if .Values.nodeplugin.httpMetrics.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: +{{ toYaml .Values.nodeplugin.httpMetrics.service.loadBalancerSourceRanges | indent 4 }} +{{- end }} + ports: + - name: http-metrics + port: {{ .Values.nodeplugin.httpMetrics.service.servicePort }} + targetPort: {{ .Values.nodeplugin.httpMetrics.containerPort }} + selector: + app: {{ include "ceph-csi-rbd.name" . }} + component: {{ .Values.nodeplugin.name }} + release: {{ .Release.Name }} + type: "{{ .Values.nodeplugin.httpMetrics.service.type }}" +{{- end -}} diff --git a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/nodeplugin-rules-clusterrole.yaml b/charts/ceph-csi-rbd/templates/nodeplugin-rules-clusterrole.yaml similarity index 100% rename from deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/nodeplugin-rules-clusterrole.yaml rename to charts/ceph-csi-rbd/templates/nodeplugin-rules-clusterrole.yaml diff --git a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/nodeplugin-serviceaccount.yaml b/charts/ceph-csi-rbd/templates/nodeplugin-serviceaccount.yaml similarity index 100% rename from deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/nodeplugin-serviceaccount.yaml rename to charts/ceph-csi-rbd/templates/nodeplugin-serviceaccount.yaml diff --git a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/provisioner-clusterrole.yaml b/charts/ceph-csi-rbd/templates/provisioner-clusterrole.yaml similarity index 100% rename from deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/provisioner-clusterrole.yaml rename to charts/ceph-csi-rbd/templates/provisioner-clusterrole.yaml diff --git a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/provisioner-clusterrolebinding.yaml b/charts/ceph-csi-rbd/templates/provisioner-clusterrolebinding.yaml similarity index 100% rename from deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/provisioner-clusterrolebinding.yaml rename to charts/ceph-csi-rbd/templates/provisioner-clusterrolebinding.yaml diff --git a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/provisioner-deployment.yaml b/charts/ceph-csi-rbd/templates/provisioner-deployment.yaml similarity index 67% rename from deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/provisioner-deployment.yaml rename to charts/ceph-csi-rbd/templates/provisioner-deployment.yaml index c6bcadac3..17fe401e3 100644 --- a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/provisioner-deployment.yaml +++ b/charts/ceph-csi-rbd/templates/provisioner-deployment.yaml @@ -1,3 +1,4 @@ +{{- if semverCompare ">=1.14" .Capabilities.KubeVersion.GitVersion -}} kind: Deployment apiVersion: apps/v1 metadata: @@ -33,16 +34,16 @@ spec: args: - "--csi-address=$(ADDRESS)" - "--v=5" - - "--timeout=60s" + - "--timeout={{ .Values.provisioner.timeout }}" - "--enable-leader-election=true" - "--leader-election-type=leases" - "--retry-interval-start=500ms" env: - name: ADDRESS - value: "{{ .Values.socketDir }}/{{ .Values.socketFile }}" + value: "unix:///csi/{{ .Values.provisionerSocketFile }}" volumeMounts: - name: socket-dir - mountPath: {{ .Values.socketDir }} + mountPath: /csi resources: {{ toYaml .Values.provisioner.provisioner.resources | indent 12 }} - name: csi-snapshotter @@ -51,16 +52,16 @@ spec: args: - "--csi-address=$(ADDRESS)" - "--v=5" - - "--timeout=60s" + - "--timeout={{ .Values.provisioner.timeout }}" - "leader-election=true" env: - name: ADDRESS - value: "{{ .Values.socketDir }}/{{ .Values.socketFile }}" + value: "unix:///csi/{{ .Values.provisionerSocketFile }}" securityContext: privileged: true volumeMounts: - name: socket-dir - mountPath: {{ .Values.socketDir }} + mountPath: /csi resources: {{ toYaml .Values.provisioner.snapshotter.resources | indent 12 }} {{- if .Values.provisioner.attacher.enabled }} @@ -70,36 +71,33 @@ spec: args: - "--v=5" - "--csi-address=$(ADDRESS)" - - "leader-election=true" + - "--leader-election=true" - "--leader-election-type=leases" env: - name: ADDRESS - value: "{{ .Values.socketDir }}/{{ .Values.socketFile }}" + value: "unix:///csi/{{ .Values.provisionerSocketFile }}" volumeMounts: - name: socket-dir - mountPath: {{ .Values.socketDir }} + mountPath: /csi resources: {{ toYaml .Values.provisioner.attacher.resources | indent 12 }} {{- end }} - name: csi-rbdplugin - securityContext: - privileged: true - capabilities: - add: ["SYS_ADMIN"] - allowPrivilegeEscalation: true image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}" imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} - args : + args: - "--nodeid=$(NODE_ID)" - "--type=rbd" - "--controllerserver=true" + - "--pidlimit=-1" +{{- if .Values.provisioner.grpcMetrics.enabled }} + - "--metricsport={{ .Values.nodeplugin.grpcMetrics.containerPort }}" + - "--metricspath=/metrics" + - "--enablegrpcmetrics=true" +{{- end }} - "--endpoint=$(CSI_ENDPOINT)" - "--v=5" - "--drivername=$(DRIVER_NAME)" - - "--pidlimit=-1" - - "--metricsport=8090" - - "--metricspath=/metrics" - - "--enablegrpcmetrics=false" env: - name: POD_IP valueFrom: @@ -112,25 +110,66 @@ spec: fieldRef: fieldPath: spec.nodeName - name: CSI_ENDPOINT - value: "unix:/{{ .Values.socketDir }}/{{ .Values.socketFile }}" + value: "unix:///csi/{{ .Values.provisionerSocketFile }}" + securityContext: + privileged: true + capabilities: + add: ["SYS_ADMIN"] + allowPrivilegeEscalation: true volumeMounts: - name: socket-dir - mountPath: {{ .Values.socketDir }} - - name: host-rootfs - mountPath: "/rootfs" + mountPath: /csi + - mountPath: /dev + name: host-dev + - mountPath: /sys + name: host-sys + - mountPath: /lib/modules + name: lib-modules + readOnly: true - name: ceph-csi-config mountPath: /etc/ceph-csi-config/ - name: keys-tmp-dir mountPath: /tmp/csi/keys resources: {{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }} +{{- if .Values.provisioner.httpMetrics.enabled }} + - name: liveness-prometheus + image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}" + imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} + args: + - "--type=liveness" + - "--endpoint=$(CSI_ENDPOINT)" + - "--metricsport={{ .Values.provisioner.httpMetrics.containerPort }}" + - "--metricspath=/metrics" + - "--polltime=60s" + - "--timeout=3s" + env: + - name: CSI_ENDPOINT + value: "unix:///csi/{{ .Values.provisionerSocketFile }}" + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + volumeMounts: + - name: socket-dir + mountPath: /csi + resources: +{{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }} +{{- end }} volumes: - name: socket-dir - emptyDir: {} -#FIXME this seems way too much. Why is it needed at all for this? - - name: host-rootfs hostPath: - path: / + path: {{ .Values.socketDir }} + type: DirectoryOrCreate + - name: host-dev + hostPath: + path: /dev + - name: host-sys + hostPath: + path: /sys + - name: lib-modules + hostPath: + path: /lib/modules - name: ceph-csi-config configMap: name: {{ .Values.configMapName | quote }} @@ -150,3 +189,4 @@ spec: tolerations: {{ toYaml .Values.provisioner.tolerations | indent 8 -}} {{- end -}} +{{- end -}} diff --git a/charts/ceph-csi-rbd/templates/provisioner-grpc-service.yaml b/charts/ceph-csi-rbd/templates/provisioner-grpc-service.yaml new file mode 100644 index 000000000..cb0c2aaff --- /dev/null +++ b/charts/ceph-csi-rbd/templates/provisioner-grpc-service.yaml @@ -0,0 +1,41 @@ +{{- if .Values.provisioner.grpcMetrics.service.enabled -}} +apiVersion: v1 +kind: Service +metadata: +{{- if .Values.provisioner.grpcMetrics.service.annotations }} + annotations: +{{ toYaml .Values.provisioner.grpcMetrics.service.annotations | indent 4 }} +{{- end }} + name: {{ include "ceph-csi-rbd.provisioner.fullname" . }}-grpc-metrics + namespace: {{ .Release.Namespace }} + labels: + app: {{ include "ceph-csi-rbd.fullname" . }} + chart: {{ include "ceph-csi-rbd.chart" . }} + component: {{ .Values.provisioner.name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: +{{- if .Values.provisioner.grpcMetrics.service.clusterIP }} + clusterIP: "{{ .Values.provisioner.grpcMetrics.service.clusterIP }}" +{{- end }} +{{- if .Values.provisioner.grpcMetrics.service.externalIPs }} + externalIPs: +{{ toYaml .Values.provisioner.grpcMetrics.service.externalIPs | indent 4 }} +{{- end }} +{{- if .Values.provisioner.grpcMetrics.service.loadBalancerIP }} + loadBalancerIP: "{{ .Values.provisioner.grpcMetrics.service.loadBalancerIP }}" +{{- end }} +{{- if .Values.provisioner.grpcMetrics.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: +{{ toYaml .Values.provisioner.grpcMetrics.service.loadBalancerSourceRanges | indent 4 }} +{{- end }} + ports: + - name: grpc-metrics + port: {{ .Values.provisioner.grpcMetrics.service.servicePort }} + targetPort: {{ .Values.provisioner.grpcMetrics.containerPort }} + selector: + app: {{ include "ceph-csi-rbd.name" . }} + component: {{ .Values.provisioner.name }} + release: {{ .Release.Name }} + type: "{{ .Values.provisioner.grpcMetrics.service.type }}" +{{- end -}} diff --git a/charts/ceph-csi-rbd/templates/provisioner-http-service.yaml b/charts/ceph-csi-rbd/templates/provisioner-http-service.yaml new file mode 100644 index 000000000..0d4c925ec --- /dev/null +++ b/charts/ceph-csi-rbd/templates/provisioner-http-service.yaml @@ -0,0 +1,41 @@ +{{- if .Values.provisioner.httpMetrics.service.enabled -}} +apiVersion: v1 +kind: Service +metadata: +{{- if .Values.provisioner.httpMetrics.service.annotations }} + annotations: +{{ toYaml .Values.provisioner.httpMetrics.service.annotations | indent 4 }} +{{- end }} + name: {{ include "ceph-csi-rbd.provisioner.fullname" . }}-http-metrics + namespace: {{ .Release.Namespace }} + labels: + app: {{ include "ceph-csi-rbd.fullname" . }} + chart: {{ include "ceph-csi-rbd.chart" . }} + component: {{ .Values.provisioner.name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: +{{- if .Values.provisioner.httpMetrics.service.clusterIP }} + clusterIP: "{{ .Values.provisioner.httpMetrics.service.clusterIP }}" +{{- end }} +{{- if .Values.provisioner.httpMetrics.service.externalIPs }} + externalIPs: +{{ toYaml .Values.provisioner.httpMetrics.service.externalIPs | indent 4 }} +{{- end }} +{{- if .Values.provisioner.httpMetrics.service.loadBalancerIP }} + loadBalancerIP: "{{ .Values.provisioner.httpMetrics.service.loadBalancerIP }}" +{{- end }} +{{- if .Values.provisioner.httpMetrics.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: +{{ toYaml .Values.provisioner.httpMetrics.service.loadBalancerSourceRanges | indent 4 }} +{{- end }} + ports: + - name: http-metrics + port: {{ .Values.provisioner.httpMetrics.service.servicePort }} + targetPort: {{ .Values.provisioner.httpMetrics.containerPort }} + selector: + app: {{ include "ceph-csi-rbd.name" . }} + component: {{ .Values.provisioner.name }} + release: {{ .Release.Name }} + type: "{{ .Values.provisioner.httpMetrics.service.type }}" +{{- end -}} diff --git a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/provisioner-role.yaml b/charts/ceph-csi-rbd/templates/provisioner-role.yaml similarity index 89% rename from deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/provisioner-role.yaml rename to charts/ceph-csi-rbd/templates/provisioner-role.yaml index 15b76cfcb..49f80c217 100644 --- a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/provisioner-role.yaml +++ b/charts/ceph-csi-rbd/templates/provisioner-role.yaml @@ -14,7 +14,9 @@ rules: - apiGroups: [""] resources: ["configmaps"] verbs: ["get", "list", "watch", "create", "delete"] +{{- if semverCompare ">=1.14" .Capabilities.KubeVersion.GitVersion }} - apiGroups: ["coordination.k8s.io"] resources: ["leases"] verbs: ["get", "watch", "list", "delete", "update", "create"] {{- end -}} +{{- end -}} diff --git a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/provisioner-rolebinding.yaml b/charts/ceph-csi-rbd/templates/provisioner-rolebinding.yaml similarity index 100% rename from deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/provisioner-rolebinding.yaml rename to charts/ceph-csi-rbd/templates/provisioner-rolebinding.yaml diff --git a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/provisioner-rules-clusterrole.yaml b/charts/ceph-csi-rbd/templates/provisioner-rules-clusterrole.yaml similarity index 86% rename from deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/provisioner-rules-clusterrole.yaml rename to charts/ceph-csi-rbd/templates/provisioner-rules-clusterrole.yaml index a5a55a3b8..94738a8df 100644 --- a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/provisioner-rules-clusterrole.yaml +++ b/charts/ceph-csi-rbd/templates/provisioner-rules-clusterrole.yaml @@ -35,24 +35,30 @@ rules: - 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"] resources: ["volumeattachments"] - verbs: ["get", "list", "watch", "update"] -{{ end }} + verbs: ["get", "list", "watch", "update", "patch"] +{{- end }} - 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", "list", "watch", "delete", "get", "update"] - apiGroups: ["csi.storage.k8s.io"] resources: ["csinodeinfos"] verbs: ["get", "list", "watch"] + - apiGroups: ["apiextensions.k8s.io"] + resources: ["customresourcedefinitions"] +{{- if semverCompare ">=1.14" .Capabilities.KubeVersion.GitVersion }} + verbs: ["create", "list", "watch", "delete", "get", "update"] +{{- else }} + verbs: ["create"] +{{- end -}} +{{- if semverCompare ">=1.14" .Capabilities.KubeVersion.GitVersion }} - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshots/status"] verbs: ["update"] {{- end -}} +{{- end -}} diff --git a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/provisioner-service.yaml b/charts/ceph-csi-rbd/templates/provisioner-service.yaml similarity index 82% rename from deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/provisioner-service.yaml rename to charts/ceph-csi-rbd/templates/provisioner-service.yaml index 8042f8b01..72b30c333 100644 --- a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/provisioner-service.yaml +++ b/charts/ceph-csi-rbd/templates/provisioner-service.yaml @@ -1,3 +1,4 @@ +{{- if semverCompare "<=1.13" .Capabilities.KubeVersion.GitVersion -}} kind: Service apiVersion: v1 metadata: @@ -18,8 +19,9 @@ spec: - name: http-metrics port: 8080 protocol: TCP - targetPort: 8080 + targetPort: 8081 - name: grpc-metrics port: 8090 protocol: TCP - targetPort: 8090 + targetPort: 8091 +{{- end -}} diff --git a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/provisioner-serviceaccount.yaml b/charts/ceph-csi-rbd/templates/provisioner-serviceaccount.yaml similarity index 100% rename from deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/provisioner-serviceaccount.yaml rename to charts/ceph-csi-rbd/templates/provisioner-serviceaccount.yaml diff --git a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/provisioner-statefulset.yaml b/charts/ceph-csi-rbd/templates/provisioner-statefulset.yaml similarity index 73% rename from deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/provisioner-statefulset.yaml rename to charts/ceph-csi-rbd/templates/provisioner-statefulset.yaml index 8d6f6fdb6..429d12e0b 100644 --- a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/provisioner-statefulset.yaml +++ b/charts/ceph-csi-rbd/templates/provisioner-statefulset.yaml @@ -1,3 +1,4 @@ +{{- if semverCompare "<=1.13" .Capabilities.KubeVersion.GitVersion -}} kind: StatefulSet apiVersion: apps/v1 metadata: @@ -11,7 +12,7 @@ metadata: heritage: {{ .Release.Service }} spec: serviceName: {{ include "ceph-csi-rbd.provisioner.fullname" . }} - replicas: {{ .Values.provisioner.replicaCount }} + replicas: 1 selector: matchLabels: app: {{ include "ceph-csi-rbd.name" . }} @@ -35,14 +36,14 @@ spec: args: - "--csi-address=$(ADDRESS)" - "--v=5" - - "--timeout=60s" + - "--timeout={{ .Values.provisioner.timeout }}" - "--retry-interval-start=500ms" env: - name: ADDRESS - value: "{{ .Values.socketDir }}/{{ .Values.socketFile }}" + value: "unix:///csi/{{ .Values.provisionerSocketFile }}" volumeMounts: - name: socket-dir - mountPath: {{ .Values.socketDir }} + mountPath: /csi resources: {{ toYaml .Values.provisioner.provisioner.resources | indent 12 }} - name: csi-snapshotter @@ -51,15 +52,15 @@ spec: args: - "--csi-address=$(ADDRESS)" - "--v=5" - - "--timeout=60s" + - "--timeout={{ .Values.provisioner.timeout }}" env: - name: ADDRESS - value: "{{ .Values.socketDir }}/{{ .Values.socketFile }}" + value: "unix:///csi/{{ .Values.provisionerSocketFile }}" securityContext: privileged: true volumeMounts: - name: socket-dir - mountPath: {{ .Values.socketDir }} + mountPath: /csi resources: {{ toYaml .Values.provisioner.snapshotter.resources | indent 12 }} {{- if .Values.provisioner.attacher.enabled }} @@ -71,32 +72,29 @@ spec: - "--csi-address=$(ADDRESS)" env: - name: ADDRESS - value: "{{ .Values.socketDir }}/{{ .Values.socketFile }}" + value: "unix:///csi/{{ .Values.provisionerSocketFile }}" volumeMounts: - name: socket-dir - mountPath: {{ .Values.socketDir }} + mountPath: /csi resources: {{ toYaml .Values.provisioner.attacher.resources | indent 12 }} {{- end }} - name: csi-rbdplugin - securityContext: - privileged: true - capabilities: - add: ["SYS_ADMIN"] - allowPrivilegeEscalation: true image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}" imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} - args : + args: - "--nodeid=$(NODE_ID)" - "--type=rbd" - "--controllerserver=true" + - "--pidlimit=-1" +{{- if .Values.provisioner.grpcMetrics.enabled }} + - "--metricsport={{ .Values.nodeplugin.grpcMetrics.containerPort }}" + - "--metricspath=/metrics" + - "--enablegrpcmetrics=true" +{{- end }} - "--endpoint=$(CSI_ENDPOINT)" - "--v=5" - "--drivername=$(DRIVER_NAME)" - - "--pidlimit=-1" - - "--metricsport=8090" - - "--metricspath=/metrics" - - "--enablegrpcmetrics=false" env: - name: POD_IP valueFrom: @@ -109,69 +107,66 @@ spec: fieldRef: fieldPath: spec.nodeName - name: CSI_ENDPOINT - value: "unix:/{{ .Values.socketDir }}/{{ .Values.socketFile }}" + value: "unix:///csi/{{ .Values.provisionerSocketFile }}" + securityContext: + privileged: true + capabilities: + add: ["SYS_ADMIN"] + allowPrivilegeEscalation: true volumeMounts: - name: socket-dir - mountPath: {{ .Values.socketDir }} - - name: host-rootfs - mountPath: "/rootfs" + mountPath: /csi + - mountPath: /dev + name: host-dev + - mountPath: /sys + name: host-sys + - mountPath: /lib/modules + name: lib-modules + readOnly: true - name: ceph-csi-config mountPath: /etc/ceph-csi-config/ - name: keys-tmp-dir mountPath: /tmp/csi/keys resources: {{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }} +{{- if .Values.provisioner.httpMetrics.enabled }} - name: liveness-prometheus image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}" + imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} args: - "--type=liveness" - "--endpoint=$(CSI_ENDPOINT)" - - "--metricsport=8080" + - "--metricsport={{ .Values.provisioner.httpMetrics.containerPort }}" - "--metricspath=/metrics" - "--polltime=60s" - "--timeout=3s" - imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} env: - name: CSI_ENDPOINT - value: "unix:/{{ .Values.socketDir }}/{{ .Values.socketFile }}" + value: "unix:///csi/{{ .Values.provisionerSocketFile }}" - name: POD_IP valueFrom: fieldRef: fieldPath: status.podIP volumeMounts: - name: socket-dir - mountPath: {{ .Values.socketDir }} - resources: -{{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }} - - name: liveness-prometheus - image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}" - args: - - "--type=liveness" - - "--endpoint=$(CSI_ENDPOINT)" - - "--metricsport=8081" - - "--metricspath=/metrics" - - "--polltime=60s" - - "--timeout=3s" - imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} - env: - - name: CSI_ENDPOINT - value: "unix:/{{ .Values.socketDir }}/{{ .Values.socketFile }}" - - name: POD_IP - valueFrom: - fieldRef: - fieldPath: status.podIP - volumeMounts: - - name: socket-dir - mountPath: {{ .Values.socketDir }} + mountPath: /csi resources: {{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }} +{{- end }} volumes: - name: socket-dir - emptyDir: {} -#FIXME this seems way too much. Why is it needed at all for this? - - name: host-rootfs hostPath: - path: / + path: {{ .Values.socketDir }} + type: DirectoryOrCreate + - name: host-dev + hostPath: + path: /dev + - name: host-sys + hostPath: + path: /sys + - name: lib-modules + hostPath: + path: /lib/modules - name: ceph-csi-config configMap: name: {{ .Values.configMapName | quote }} @@ -191,3 +186,4 @@ spec: tolerations: {{ toYaml .Values.provisioner.tolerations | indent 8 -}} {{- end -}} +{{- end -}} diff --git a/charts/ceph-csi-rbd/values.yaml b/charts/ceph-csi-rbd/values.yaml new file mode 100644 index 000000000..582745da9 --- /dev/null +++ b/charts/ceph-csi-rbd/values.yaml @@ -0,0 +1,231 @@ +--- +rbac: + # Specifies whether RBAC resources should be created + create: true + +serviceAccounts: + nodeplugin: + # Specifies whether a ServiceAccount should be created + create: true + # The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname + name: + provisioner: + # Specifies whether a ServiceAccount should be created + create: true + # The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname + name: + +# Configuration for the CSI to connect to the cluster +# Ref: https://github.com/ceph/ceph-csi/blob/master/examples/README.md +# Example: +# csiConfig: +# - clusterID: "" +# monitors: +# - "" +# - "" +csiConfig: [] + +nodeplugin: + name: nodeplugin + + httpMetrics: + # Metrics only available for cephcsi/cephcsi => 1.2.0 + # Specifies whether http metrics should be exposed + enabled: true + # The port of the container to expose the metrics + containerPort: 8080 + + service: + # Specifies whether a service should be created fot the metrics + enabled: true + # The port to use for the service + servicePort: 8080 + type: ClusterIP + + # Annotations for the service + # Example: + # annotations: + # prometheus.io/scrape: "true" + # prometheus.io/port: "8080" + annotations: {} + + clusterIP: "" + + ## List of IP addresses at which the stats-exporter service is available + ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips + ## + externalIPs: [] + + loadBalancerIP: "" + loadBalancerSourceRanges: [] + + grpcMetrics: + # Metrics only available for cephcsi/cephcsi => 1.2.0 + # Specifies whether grpc metrics should be exposed + enabled: true + # The port of the container to expose the metrics + containerPort: 8090 + + service: + # Specifies whether a service should be created fot the metrics + enabled: true + # The port to use for the service + servicePort: 8090 + type: ClusterIP + + # Annotations for the service + # Example: + # annotations: + # prometheus.io/scrape: "true" + # prometheus.io/port: "8090" + annotations: {} + + clusterIP: "" + + ## List of IP addresses at which the stats-exporter service is available + ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips + ## + externalIPs: [] + + loadBalancerIP: "" + loadBalancerSourceRanges: [] + + registrar: + image: + repository: quay.io/k8scsi/csi-node-driver-registrar + tag: v1.1.0 + pullPolicy: IfNotPresent + resources: {} + + plugin: + image: + repository: quay.io/cephcsi/cephcsi + tag: canary + pullPolicy: IfNotPresent + resources: {} + + nodeSelector: {} + + tolerations: [] + + affinity: {} + +provisioner: + name: provisioner + # When using Kubernetes <1.14 this value is ignored + # The statefulset is deployed with replicas: 1 + replicaCount: 3 + # Timeout for waiting for creation or deletion of a volume + timeout: 60s + + httpMetrics: + # Metrics only available for cephcis/cephsi => 1.2.0 + # Specifies whether http metrics should be exposed + enabled: true + # The port of the container to expose the metrics + containerPort: 8080 + + service: + # Specifies whether a service should be created fot the metrics + enabled: true + # The port to use for the service + servicePort: 8080 + type: ClusterIP + + # Annotations for the service + # Example: + # annotations: + # prometheus.io/scrape: "true" + # prometheus.io/port: "8080" + annotations: {} + + clusterIP: "" + + ## List of IP addresses at which the stats-exporter service is available + ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips + ## + externalIPs: [] + + loadBalancerIP: "" + loadBalancerSourceRanges: [] + + grpcMetrics: + # Metrics only available for cephcis/cephsi => 1.2.0 + # Specifies whether grpc metrics should be exposed + enabled: true + # The port of the container to expose the metrics + containerPort: 8090 + + service: + # Specifies whether a service should be created fot the metrics + enabled: true + # The port to use for the service + servicePort: 8090 + type: ClusterIP + + # Annotations for the service + # Example: + # annotations: + # prometheus.io/scrape: "true" + # prometheus.io/port: "8090" + annotations: {} + + clusterIP: "" + + ## List of IP addresses at which the stats-exporter service is available + ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips + ## + externalIPs: [] + + loadBalancerIP: "" + loadBalancerSourceRanges: [] + + provisioner: + image: + repository: quay.io/k8scsi/csi-provisioner + tag: v1.3.0 + pullPolicy: IfNotPresent + resources: {} + + attacher: + name: attacher + enabled: true + image: + repository: quay.io/k8scsi/csi-attacher + tag: v1.2.1 + pullPolicy: IfNotPresent + resources: {} + + snapshotter: + image: + repository: quay.io/k8scsi/csi-snapshotter + tag: v1.2.1 + pullPolicy: IfNotPresent + resources: {} + + nodeSelector: {} + + tolerations: [] + + affinity: {} + +######################################################### +# Variables for 'internal' use please use with caution! # +######################################################### + +# The directory where the provisioner and pluginSocketFile will be mounted +socketDir: /var/lib/kubelet/plugins/rbd.csi.ceph.com +# The filename of the provisioner socket +provisionerSocketFile: csi-provisioner.sock +# The filename of the plugin socket +pluginSocketFile: csi.sock +# The directory where nodeplugin socket is created +registrationDir: /var/lib/kubelet/plugins_registry +# The nodeplugin plugins directory +pluginDir: /var/lib/kubelet/plugins +# Name of the csi-driver +driverName: rbd.csi.ceph.com +# Name of the configmap used for state +configMapName: ceph-csi-config-rbd diff --git a/deploy.sh b/deploy.sh index c483115bd..eec25b332 100755 --- a/deploy.sh +++ b/deploy.sh @@ -3,15 +3,26 @@ push_helm_charts() { PACKAGE=$1 CHANGED=0 - VERSION=$(grep 'version:' deploy/"$PACKAGE"/helm/Chart.yaml | awk '{print $2}') + VERSION=${ENV_CSI_IMAGE_VERSION//v} # Set version (without v prefix) - if [ ! -f "tmp/csi-charts/docs/$PACKAGE/ceph-csi-$PACKAGE-$VERSION.tgz" ]; then + # Always run when version is canary, when versioned only when the package doesn't exist yet + if [ ! -f "tmp/csi-charts/docs/$PACKAGE/ceph-csi-$PACKAGE-$VERSION.tgz" ] && [ -z "$VERSION" ]; then CHANGED=1 - ln -s helm deploy/"$PACKAGE"/ceph-csi-"$PACKAGE" + + # When version defined it is a release, not a canary build + if [ -z "$VERSION" ]; then + # Replace appVersion: canary and version: *-canary with the actual version + sed -i "s/\(\s.*canary\)/$VERSION/" "charts/ceph-csi-$PACKAGE/Chart.yaml" + + # Replace master with the version branch + sed -i "s/tree\/master/tree\/release-v$VERSION/" "charts/ceph-csi-$PACKAGE/Chart.yaml" + fi + + ln -s helm charts/ceph-csi-"$PACKAGE" mkdir -p tmp/csi-charts/docs/"$PACKAGE" pushd tmp/csi-charts/docs/"$PACKAGE" >/dev/null helm init --client-only - helm package ../../../../deploy/"$PACKAGE"/ceph-csi-"$PACKAGE" + helm package ../../../../charts/ceph-csi-"$PACKAGE" popd >/dev/null fi diff --git a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/README.md b/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/README.md deleted file mode 100644 index fcd4a98a8..000000000 --- a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# ceph-csi-cephfs - -The ceph-csi-cephfs chart adds cephfs volume support to your cluster. - -## Install Chart - -To install the Chart into your Kubernetes cluster - -```bash -helm install --namespace "ceph-csi-cephfs" --name "ceph-csi-cephfs" ceph-csi/ceph-csi-cephfs -``` - -After installation succeeds, you can get a status of Chart - -```bash -helm status "ceph-csi-cephfs" -``` - -If you want to delete your Chart, use this command - -```bash -helm delete --purge "ceph-csi-cephfs" -``` - -If you want to delete the namespace, use this command - -```bash -kubectl delete namespace ceph-csi-rbd -``` diff --git a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/csidriver-crd.yaml b/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/csidriver-crd.yaml deleted file mode 100644 index 8bdb83c4a..000000000 --- a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/csidriver-crd.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -{{ if not .Values.provisioner.attacher.enabled }} -apiVersion: storage.k8s.io/v1beta1 -kind: CSIDriver -metadata: - name: {{ .Values.driverName }} - namespace: {{ .Release.Namespace }} -spec: - attachRequired: false - podInfoOnMount: false -{{ end }} diff --git a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/csiplugin-configmap.yaml b/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/csiplugin-configmap.yaml deleted file mode 100644 index b89bd9e43..000000000 --- a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/csiplugin-configmap.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ .Values.configMapName | quote }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ include "ceph-csi-cephfs.name" . }} - chart: {{ include "ceph-csi-cephfs.chart" . }} - component: {{ .Values.provisioner.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: - config.json: |- - [] diff --git a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/nodeplugin-service.yaml b/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/nodeplugin-service.yaml deleted file mode 100644 index 00500c053..000000000 --- a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/nodeplugin-service.yaml +++ /dev/null @@ -1,25 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: {{ include "ceph-csi-cephfs.nodeplugin.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: csi-metrics - chart: {{ include "ceph-csi-cephfs.chart" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - selector: - app: {{ include "ceph-csi-cephfs.name" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - ports: - - name: http-metrics - port: 8080 - protocol: TCP - targetPort: 8081 - - name: grpc-metrics - port: 8090 - protocol: TCP - targetPort: 8091 diff --git a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/provisioner-role.yaml b/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/provisioner-role.yaml deleted file mode 100644 index 5a112619b..000000000 --- a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/templates/provisioner-role.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if .Values.rbac.create -}} -kind: Role -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ include "ceph-csi-cephfs.provisioner.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ include "ceph-csi-cephfs.name" . }} - chart: {{ include "ceph-csi-cephfs.chart" . }} - component: {{ .Values.provisioner.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -rules: - - apiGroups: [""] - resources: ["endpoints"] - verbs: ["get", "watch", "list", "delete", "update", "create"] - - apiGroups: [""] - resources: ["configmaps"] - verbs: ["get", "list", "watch", "create", "delete"] -{{- end -}} diff --git a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/values.yaml b/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/values.yaml deleted file mode 100644 index 6538a4336..000000000 --- a/deploy/cephfs/kubernetes/v1.13/helm/ceph-csi-cephfs/values.yaml +++ /dev/null @@ -1,71 +0,0 @@ ---- -rbac: - create: true - -serviceAccounts: - attacher: - create: true - name: - nodeplugin: - create: true - name: - provisioner: - create: true - name: - -socketDir: /var/lib/kubelet/plugins/cephfs.csi.ceph.com -socketFile: csi.sock -registrationDir: /var/lib/kubelet/plugins_registry -pluginDir: /var/lib/kubelet/plugins -driverName: cephfs.csi.ceph.com -configMapName: ceph-csi-config - -nodeplugin: - name: nodeplugin - - registrar: - image: - repository: quay.io/k8scsi/csi-node-driver-registrar - tag: v1.1.0 - pullPolicy: IfNotPresent - resources: {} - - plugin: - image: - repository: quay.io/cephcsi/cephcsi - # for stable functionality replace canary with latest release version - tag: canary - pullPolicy: IfNotPresent - resources: {} - - nodeSelector: {} - - tolerations: [] - - affinity: {} - -provisioner: - name: provisioner - replicaCount: 1 - - provisioner: - image: - repository: quay.io/k8scsi/csi-provisioner - tag: v1.3.0 - pullPolicy: IfNotPresent - resources: {} - - attacher: - name: attacher - enabled: true - image: - repository: quay.io/k8scsi/csi-attacher - tag: v1.2.0 - pullPolicy: IfNotPresent - resources: {} - - nodeSelector: {} - - tolerations: [] - - affinity: {} diff --git a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/Chart.yaml b/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/Chart.yaml deleted file mode 100644 index 8643498fe..000000000 --- a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/Chart.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -apiVersion: v1 -appVersion: "1.3.0" -description: "Container Storage Interface (CSI) driver, -provisioner, and attacher for Ceph cephfs" -name: ceph-csi-cephfs -version: 0.9.0 -keywords: - - ceph - - cephfs - - ceph-csi -home: https://github.com/ceph/ceph-csi -sources: - - https://github.com/ceph/ceph-csi/tree/csi-v1.0/deploy/cephfs/helm -icon: https://raw.githubusercontent.com/ceph/ceph-csi/master/assets/ceph-logo.png diff --git a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/NOTES.txt b/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/NOTES.txt deleted file mode 100644 index 3af9f2b57..000000000 --- a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/NOTES.txt +++ /dev/null @@ -1,2 +0,0 @@ -Examples on how to configure a storage class and start using the driver are here: -https://github.com/ceph/ceph-csi/tree/csi-v1.0/examples/cephfs diff --git a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/_helpers.tpl b/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/_helpers.tpl deleted file mode 100644 index 635cca67b..000000000 --- a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/_helpers.tpl +++ /dev/null @@ -1,90 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "ceph-csi-cephfs.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "ceph-csi-cephfs.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "ceph-csi-cephfs.nodeplugin.fullname" -}} -{{- if .Values.nodeplugin.fullnameOverride -}} -{{- .Values.nodeplugin.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- printf "%s-%s" .Release.Name .Values.nodeplugin.name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s-%s" .Release.Name $name .Values.nodeplugin.name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "ceph-csi-cephfs.provisioner.fullname" -}} -{{- if .Values.provisioner.fullnameOverride -}} -{{- .Values.provisioner.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- printf "%s-%s" .Release.Name .Values.provisioner.name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s-%s" .Release.Name $name .Values.provisioner.name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "ceph-csi-cephfs.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "ceph-csi-cephfs.serviceAccountName.nodeplugin" -}} -{{- if .Values.serviceAccounts.nodeplugin.create -}} - {{ default (include "ceph-csi-cephfs.nodeplugin.fullname" .) .Values.serviceAccounts.nodeplugin.name }} -{{- else -}} - {{ default "default" .Values.serviceAccounts.nodeplugin.name }} -{{- end -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "ceph-csi-cephfs.serviceAccountName.provisioner" -}} -{{- if .Values.serviceAccounts.provisioner.create -}} - {{ default (include "ceph-csi-cephfs.provisioner.fullname" .) .Values.serviceAccounts.provisioner.name }} -{{- else -}} - {{ default "default" .Values.serviceAccounts.provisioner.name }} -{{- end -}} -{{- end -}} diff --git a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/nodeplugin-clusterrole.yaml b/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/nodeplugin-clusterrole.yaml deleted file mode 100644 index 4ed09bf9e..000000000 --- a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/nodeplugin-clusterrole.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if .Values.rbac.create -}} -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ include "ceph-csi-cephfs.nodeplugin.fullname" . }} - labels: - app: {{ include "ceph-csi-cephfs.name" . }} - chart: {{ include "ceph-csi-cephfs.chart" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -aggregationRule: - clusterRoleSelectors: - - matchLabels: - rbac.cephfs.csi.ceph.com/aggregate-to-{{ include "ceph-csi-cephfs.nodeplugin.fullname" . }}: "true" -rules: [] -{{- end -}} diff --git a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/nodeplugin-clusterrolebinding.yaml b/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/nodeplugin-clusterrolebinding.yaml deleted file mode 100644 index 2fa8b38bf..000000000 --- a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/nodeplugin-clusterrolebinding.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if .Values.rbac.create -}} -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ include "ceph-csi-cephfs.nodeplugin.fullname" . }} - labels: - app: {{ include "ceph-csi-cephfs.name" . }} - chart: {{ include "ceph-csi-cephfs.chart" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -subjects: - - kind: ServiceAccount - name: {{ include "ceph-csi-cephfs.serviceAccountName.nodeplugin" . }} - namespace: {{ .Release.Namespace }} -roleRef: - kind: ClusterRole - name: {{ include "ceph-csi-cephfs.nodeplugin.fullname" . }} - apiGroup: rbac.authorization.k8s.io -{{- end -}} diff --git a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/nodeplugin-daemonset.yaml b/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/nodeplugin-daemonset.yaml deleted file mode 100644 index da474afe6..000000000 --- a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/nodeplugin-daemonset.yaml +++ /dev/null @@ -1,191 +0,0 @@ -kind: DaemonSet -apiVersion: apps/v1 -metadata: - name: {{ include "ceph-csi-cephfs.nodeplugin.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ include "ceph-csi-cephfs.name" . }} - chart: {{ include "ceph-csi-cephfs.chart" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - selector: - matchLabels: - app: {{ include "ceph-csi-cephfs.name" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ include "ceph-csi-cephfs.name" . }} - chart: {{ include "ceph-csi-cephfs.chart" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - spec: - serviceAccountName: {{ include "ceph-csi-cephfs.serviceAccountName.nodeplugin" . }} - hostNetwork: true - hostPID: true - # to use e.g. Rook orchestrated cluster, and mons' FQDN is - # resolved through k8s service, set dns policy to cluster first - dnsPolicy: ClusterFirstWithHostNet - containers: - - name: driver-registrar - image: "{{ .Values.nodeplugin.registrar.image.repository }}:{{ .Values.nodeplugin.registrar.image.tag }}" - imagePullPolicy: {{ .Values.nodeplugin.registrar.image.pullPolicy }} - args: - - "--v=5" - - "--csi-address=/csi/{{ .Values.socketFile }}" - - "--kubelet-registration-path={{ .Values.socketDir }}/{{ .Values.socketFile }}" - lifecycle: - preStop: - exec: - command: [ - "/bin/sh", "-c", - 'rm -rf /registration/{{ .Values.driverName }} - /registration/{{ .Values.driverName }}-reg.sock' - ] - env: - - name: KUBE_NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - volumeMounts: - - name: plugin-dir - mountPath: /csi - - name: registration-dir - mountPath: /registration - resources: -{{ toYaml .Values.nodeplugin.registrar.resources | indent 12 }} - - name: csi-cephfsplugin - securityContext: - privileged: true - capabilities: - add: ["SYS_ADMIN"] - allowPrivilegeEscalation: true - image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}" - args : - - "--nodeid=$(NODE_ID)" - - "--type=cephfs" - - "--nodeserver=true" - - "--endpoint=$(CSI_ENDPOINT)" - - "--v=5" - - "--drivername=$(DRIVER_NAME)" - - "--metadatastorage=k8s_configmap" - - "--mountcachedir=/mount-cache-dir" - - "--metricsport=8091" - - "--metricspath=/metrics" - - "--enablegrpcmetrics=false" - env: - - name: POD_IP - valueFrom: - fieldRef: - fieldPath: status.podIP - - name: DRIVER_NAME - value: {{ .Values.driverName }} - - name: NODE_ID - valueFrom: - fieldRef: - fieldPath: spec.nodeName - - name: CSI_ENDPOINT - value: "unix:/{{ .Values.socketDir }}/{{ .Values.socketFile }}" - imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} - volumeMounts: - - name: mount-cache-dir - mountPath: /mount-cache-dir - - name: socket-dir - mountPath: {{ .Values.socketDir }} - - name: plugin-dir - mountPath: {{ .Values.pluginDir }} - mountPropagation: "Bidirectional" - - name: mountpoint-dir - mountPath: /var/lib/kubelet/pods - mountPropagation: "Bidirectional" - - mountPath: /dev - name: host-dev - - mountPath: /rootfs - name: host-rootfs - - mountPath: /sys - name: host-sys - - mountPath: /lib/modules - name: lib-modules - readOnly: true - - name: ceph-csi-config - mountPath: /etc/ceph-csi-config/ - - name: keys-tmp-dir - mountPath: /tmp/csi/keys - resources: -{{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }} - - name: liveness-prometheus - image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}" - args: - - "--type=liveness" - - "--endpoint=$(CSI_ENDPOINT)" - - "--metricsport=8081" - - "--metricspath=/metrics" - - "--polltime=60s" - - "--timeout=3s" - imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} - env: - - name: CSI_ENDPOINT - value: "unix:/{{ .Values.socketDir }}/{{ .Values.socketFile }}" - - name: POD_IP - valueFrom: - fieldRef: - fieldPath: status.podIP - volumeMounts: - - name: plugin-dir - mountPath: {{ .Values.socketDir }} - resources: -{{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }} - volumes: - - name: mount-cache-dir - emptyDir: {} - - name: socket-dir - hostPath: - path: {{ .Values.socketDir }} - type: DirectoryOrCreate - - name: registration-dir - hostPath: - path: {{ .Values.registrationDir }} - type: Directory - - name: plugin-dir - hostPath: - path: {{ .Values.pluginDir }} - type: Directory - - name: mountpoint-dir - hostPath: - path: /var/lib/kubelet/pods - type: DirectoryOrCreate - - name: host-dev - hostPath: - path: /dev - - name: host-rootfs - hostPath: - path: / - - name: host-sys - hostPath: - path: /sys - - name: lib-modules - hostPath: - path: /lib/modules - - name: ceph-csi-config - configMap: - name: {{ .Values.configMapName | quote }} - - name: keys-tmp-dir - emptyDir: { - medium: "Memory" - } -{{- if .Values.nodeplugin.affinity }} - affinity: -{{ toYaml .Values.nodeplugin.affinity . | indent 8 -}} -{{- end -}} -{{- if .Values.nodeplugin.nodeSelector }} - nodeSelector: -{{ toYaml .Values.nodeplugin.nodeSelector | indent 8 -}} -{{- end -}} -{{- if .Values.nodeplugin.tolerations }} - tolerations: -{{ toYaml .Values.nodeplugin.tolerations | indent 8 -}} -{{- end -}} diff --git a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/nodeplugin-rules-clusterrole.yaml b/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/nodeplugin-rules-clusterrole.yaml deleted file mode 100644 index 8b90d9ed8..000000000 --- a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/nodeplugin-rules-clusterrole.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- if .Values.rbac.create -}} -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ include "ceph-csi-cephfs.nodeplugin.fullname" . }}-rules - labels: - app: {{ include "ceph-csi-cephfs.name" . }} - chart: {{ include "ceph-csi-cephfs.chart" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - rbac.cephfs.csi.ceph.com/aggregate-to-{{ include "ceph-csi-cephfs.nodeplugin.fullname" . }}: "true" -rules: - - apiGroups: [""] - resources: ["configmaps"] - verbs: ["get", "list"] - - apiGroups: [""] - resources: ["nodes"] - verbs: ["get", "list", "update"] - - apiGroups: [""] - resources: ["namespaces"] - verbs: ["get", "list"] - - apiGroups: [""] - resources: ["persistentvolumes"] - verbs: ["get", "list", "watch", "update"] - - apiGroups: ["storage.k8s.io"] - resources: ["volumeattachments"] - verbs: ["get", "list", "watch", "update"] - - apiGroups: [""] - resources: ["configmaps"] - verbs: ["get", "list"] -{{- end -}} diff --git a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/nodeplugin-service.yaml b/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/nodeplugin-service.yaml deleted file mode 100644 index 00500c053..000000000 --- a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/nodeplugin-service.yaml +++ /dev/null @@ -1,25 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: {{ include "ceph-csi-cephfs.nodeplugin.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: csi-metrics - chart: {{ include "ceph-csi-cephfs.chart" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - selector: - app: {{ include "ceph-csi-cephfs.name" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - ports: - - name: http-metrics - port: 8080 - protocol: TCP - targetPort: 8081 - - name: grpc-metrics - port: 8090 - protocol: TCP - targetPort: 8091 diff --git a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/nodeplugin-serviceaccount.yaml b/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/nodeplugin-serviceaccount.yaml deleted file mode 100644 index 5dedaf4b0..000000000 --- a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/nodeplugin-serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ -{{- if .Values.serviceAccounts.nodeplugin.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "ceph-csi-cephfs.serviceAccountName.nodeplugin" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ include "ceph-csi-cephfs.name" . }} - chart: {{ include "ceph-csi-cephfs.chart" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -{{- end -}} diff --git a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-clusterrole.yaml b/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-clusterrole.yaml deleted file mode 100644 index c656b139a..000000000 --- a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-clusterrole.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if .Values.rbac.create -}} -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ include "ceph-csi-cephfs.provisioner.fullname" . }} - labels: - app: {{ include "ceph-csi-cephfs.name" . }} - chart: {{ include "ceph-csi-cephfs.chart" . }} - component: {{ .Values.provisioner.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -aggregationRule: - clusterRoleSelectors: - - matchLabels: - rbac.cephfs.csi.ceph.com/aggregate-to-{{ include "ceph-csi-cephfs.provisioner.fullname" . }}: "true" -rules: [] -{{- end -}} diff --git a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-clusterrolebinding.yaml b/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-clusterrolebinding.yaml deleted file mode 100644 index 82d5d1316..000000000 --- a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-clusterrolebinding.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if .Values.rbac.create -}} -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ include "ceph-csi-cephfs.provisioner.fullname" . }} - labels: - app: {{ include "ceph-csi-cephfs.name" . }} - chart: {{ include "ceph-csi-cephfs.chart" . }} - component: {{ .Values.provisioner.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -subjects: - - kind: ServiceAccount - name: {{ include "ceph-csi-cephfs.serviceAccountName.provisioner" . }} - namespace: {{ .Release.Namespace }} -roleRef: - kind: ClusterRole - name: {{ include "ceph-csi-cephfs.provisioner.fullname" . }} - apiGroup: rbac.authorization.k8s.io -{{- end -}} diff --git a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-rolebinding.yaml b/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-rolebinding.yaml deleted file mode 100644 index 66fb72580..000000000 --- a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-rolebinding.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if .Values.rbac.create -}} -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ include "ceph-csi-cephfs.provisioner.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ include "ceph-csi-cephfs.name" . }} - chart: {{ include "ceph-csi-cephfs.chart" . }} - component: {{ .Values.provisioner.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -subjects: - - kind: ServiceAccount - name: {{ include "ceph-csi-cephfs.serviceAccountName.provisioner" . }} - namespace: {{ .Release.Namespace }} -roleRef: - kind: Role - name: {{ include "ceph-csi-cephfs.provisioner.fullname" . }} - apiGroup: rbac.authorization.k8s.io -{{- end -}} diff --git a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-rules-clusterrole.yaml b/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-rules-clusterrole.yaml deleted file mode 100644 index 6356851ad..000000000 --- a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-rules-clusterrole.yaml +++ /dev/null @@ -1,40 +0,0 @@ -{{- if .Values.rbac.create -}} -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ include "ceph-csi-cephfs.provisioner.fullname" . }}-rules - labels: - app: {{ include "ceph-csi-cephfs.name" . }} - chart: {{ include "ceph-csi-cephfs.chart" . }} - component: {{ .Values.provisioner.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - rbac.cephfs.csi.ceph.com/aggregate-to-{{ include "ceph-csi-cephfs.provisioner.fullname" . }}: "true" -rules: - - apiGroups: [""] - resources: ["nodes"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "list"] - - apiGroups: [""] - resources: ["persistentvolumes"] - verbs: ["get", "list", "watch", "create", "delete"] - - apiGroups: [""] - resources: ["persistentvolumeclaims"] - verbs: ["get", "list", "watch", "update"] - - apiGroups: ["storage.k8s.io"] - resources: ["storageclasses"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["events"] - verbs: ["list", "watch", "create", "update", "patch"] - - apiGroups: ["csi.storage.k8s.io"] - resources: ["csinodeinfos"] - verbs: ["get", "list", "watch"] -{{ if .Values.provisioner.attacher.enabled }} - - apiGroups: ["storage.k8s.io"] - resources: ["volumeattachments"] - verbs: ["get", "list", "watch", "update"] -{{ end }} -{{- end -}} diff --git a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-service.yaml b/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-service.yaml deleted file mode 100644 index 65247935d..000000000 --- a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-service.yaml +++ /dev/null @@ -1,25 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: {{ include "ceph-csi-cephfs.provisioner.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: csi-metrics - chart: {{ include "ceph-csi-cephfs.chart" . }} - component: {{ .Values.provisioner.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - selector: - app: {{ include "ceph-csi-cephfs.name" . }} - component: {{ .Values.provisioner.name }} - release: {{ .Release.Name }} - ports: - - name: http-metrics - port: 8080 - protocol: TCP - targetPort: 8081 - - name: grpc-metrics - port: 8090 - protocol: TCP - targetPort: 8091 diff --git a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-serviceaccount.yaml b/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-serviceaccount.yaml deleted file mode 100644 index c4ba5c188..000000000 --- a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/templates/provisioner-serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ -{{- if .Values.serviceAccounts.provisioner.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "ceph-csi-cephfs.serviceAccountName.provisioner" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ include "ceph-csi-cephfs.name" . }} - chart: {{ include "ceph-csi-cephfs.chart" . }} - component: {{ .Values.provisioner.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -{{- end -}} diff --git a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/values.yaml b/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/values.yaml deleted file mode 100644 index 0224284a4..000000000 --- a/deploy/cephfs/kubernetes/v1.14+/helm/ceph-csi-cephfs/values.yaml +++ /dev/null @@ -1,71 +0,0 @@ ---- -rbac: - create: true - -serviceAccounts: - attacher: - create: true - name: - nodeplugin: - create: true - name: - provisioner: - create: true - name: - -socketDir: /var/lib/kubelet/plugins/cephfs.csi.ceph.com -socketFile: csi.sock -registrationDir: /var/lib/kubelet/plugins_registry -pluginDir: /var/lib/kubelet/plugins -driverName: cephfs.csi.ceph.com -configMapName: ceph-csi-config - -nodeplugin: - name: nodeplugin - - registrar: - image: - repository: quay.io/k8scsi/csi-node-driver-registrar - tag: v1.1.0 - pullPolicy: IfNotPresent - resources: {} - - plugin: - image: - repository: quay.io/cephcsi/cephcsi - # for stable functionality replace canary with latest release version - tag: canary - pullPolicy: IfNotPresent - resources: {} - - nodeSelector: {} - - tolerations: [] - - affinity: {} - -provisioner: - name: provisioner - replicaCount: 3 - - provisioner: - image: - repository: quay.io/k8scsi/csi-provisioner - tag: v1.3.0 - pullPolicy: IfNotPresent - resources: {} - - attacher: - name: attacher - enabled: true - image: - repository: quay.io/k8scsi/csi-attacher - tag: v1.2.0 - pullPolicy: IfNotPresent - resources: {} - - nodeSelector: {} - - tolerations: [] - - affinity: {} diff --git a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/.helmignore b/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/.helmignore deleted file mode 100644 index f0c131944..000000000 --- a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/csidriver-crd.yaml b/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/csidriver-crd.yaml deleted file mode 100644 index 7c2ee0469..000000000 --- a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/csidriver-crd.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -{{ if not .Values.provisioner.attacher.enabled }} -apiVersion: storage.k8s.io/v1beta1 -kind: CSIDriver -metadata: - name: {{ .Values.driverName }} -spec: - attachRequired: false - podInfoOnMount: false -{{ end }} diff --git a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/csiplugin-configmap.yaml b/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/csiplugin-configmap.yaml deleted file mode 100644 index 80ec5057b..000000000 --- a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/csiplugin-configmap.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ .Values.configMapName | quote }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ include "ceph-csi-rbd.name" . }} - chart: {{ include "ceph-csi-rbd.chart" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: - config.json: |- - [] diff --git a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/nodeplugin-service.yaml b/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/nodeplugin-service.yaml deleted file mode 100644 index da24ecb53..000000000 --- a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/nodeplugin-service.yaml +++ /dev/null @@ -1,25 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: {{ include "ceph-csi-rbd.nodeplugin.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: csi-metrics - chart: {{ include "ceph-csi-rbd.chart" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - selector: - app: {{ include "ceph-csi-rbd.name" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - ports: - - name: http-metrics - port: 8080 - protocol: TCP - targetPort: 8080 - - name: grpc-metrics - port: 8090 - protocol: TCP - targetPort: 8090 diff --git a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/provisioner-role.yaml b/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/provisioner-role.yaml deleted file mode 100644 index ba22b26f8..000000000 --- a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/provisioner-role.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if .Values.rbac.create -}} -kind: Role -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ include "ceph-csi-rbd.provisioner.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ include "ceph-csi-rbd.name" . }} - chart: {{ include "ceph-csi-rbd.chart" . }} - component: {{ .Values.provisioner.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -rules: - - apiGroups: [""] - resources: ["configmaps"] - verbs: ["get", "list", "watch", "create", "delete"] -{{- end -}} diff --git a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/provisioner-rules-clusterrole.yaml b/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/provisioner-rules-clusterrole.yaml deleted file mode 100644 index 2a32b0666..000000000 --- a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/templates/provisioner-rules-clusterrole.yaml +++ /dev/null @@ -1,55 +0,0 @@ -{{- if .Values.rbac.create -}} -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ include "ceph-csi-rbd.provisioner.fullname" . }}-rules - labels: - app: {{ include "ceph-csi-rbd.name" . }} - chart: {{ include "ceph-csi-rbd.chart" . }} - component: {{ .Values.provisioner.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - rbac.rbd.csi.ceph.com/aggregate-to-{{ include "ceph-csi-rbd.provisioner.fullname" . }}: "true" -rules: - - apiGroups: [""] - resources: ["nodes"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "list"] - - apiGroups: [""] - resources: ["persistentvolumes"] - verbs: ["get", "list", "watch", "create", "update", "delete"] - - apiGroups: [""] - resources: ["persistentvolumeclaims"] - verbs: ["get", "list", "watch", "update"] - - apiGroups: ["storage.k8s.io"] - resources: ["storageclasses"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["events"] - verbs: ["list", "watch", "create", "update", "patch"] - - apiGroups: [""] - resources: ["endpoints"] - verbs: ["get", "create", "update"] - - apiGroups: ["snapshot.storage.k8s.io"] - resources: ["volumesnapshots"] - verbs: ["get", "list", "watch", "update"] -{{ if .Values.provisioner.attacher.enabled }} - - apiGroups: ["storage.k8s.io"] - resources: ["volumeattachments"] - verbs: ["get", "list", "watch", "update"] -{{ end }} - - 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"] - - apiGroups: ["csi.storage.k8s.io"] - resources: ["csinodeinfos"] - verbs: ["get", "list", "watch"] -{{- end -}} diff --git a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/values.yaml b/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/values.yaml deleted file mode 100644 index 6ef6a9b1c..000000000 --- a/deploy/rbd/kubernetes/v1.13/helm/ceph-csi-rbd/values.yaml +++ /dev/null @@ -1,77 +0,0 @@ ---- -rbac: - create: true - -serviceAccounts: - attacher: - create: true - name: - nodeplugin: - create: true - name: - provisioner: - create: true - name: - -socketDir: /var/lib/kubelet/plugins/rbd.csi.ceph.com -socketFile: csi.sock -registrationDir: /var/lib/kubelet/plugins_registry -pluginDir: /var/lib/kubelet/plugins -driverName: rbd.csi.ceph.com -configMapName: ceph-csi-config - -nodeplugin: - name: nodeplugin - - registrar: - image: - repository: quay.io/k8scsi/csi-node-driver-registrar - tag: v1.1.0 - pullPolicy: IfNotPresent - resources: {} - - plugin: - image: - repository: quay.io/cephcsi/cephcsi - # for stable functionality replace canary with latest release version - tag: canary - pullPolicy: IfNotPresent - resources: {} - - nodeSelector: {} - - tolerations: [] - - affinity: {} - -provisioner: - name: provisioner - replicaCount: 1 - - provisioner: - image: - repository: quay.io/k8scsi/csi-provisioner - tag: v1.3.0 - pullPolicy: IfNotPresent - resources: {} - - snapshotter: - image: - repository: quay.io/k8scsi/csi-snapshotter - tag: v1.1.0 - pullPolicy: IfNotPresent - resources: {} - - attacher: - enabled: true - image: - repository: quay.io/k8scsi/csi-attacher - tag: v1.2.0 - pullPolicy: IfNotPresent - resources: {} - - nodeSelector: {} - - tolerations: [] - - affinity: {} diff --git a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/.helmignore b/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/.helmignore deleted file mode 100644 index f0c131944..000000000 --- a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/Chart.yaml b/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/Chart.yaml deleted file mode 100644 index 9f39cb20a..000000000 --- a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/Chart.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -apiVersion: v1 -appVersion: "1.0.0" -description: "Container Storage Interface (CSI) driver, -provisioner, snapshotter, and attacher for Ceph RBD" -name: ceph-csi-rbd -version: 0.8.0 -keywords: - - ceph - - rbd - - ceph-csi -home: https://github.com/ceph/ceph-csi -sources: - - https://github.com/ceph/ceph-csi/tree/csi-v1.0/deploy/rbd/helm -icon: https://raw.githubusercontent.com/ceph/ceph-csi/master/assets/ceph-logo.png diff --git a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/README.md b/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/README.md deleted file mode 100644 index 250c10add..000000000 --- a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# ceph-csi-rbd - -The ceph-csi-rbd chart adds rbd volume support to your cluster. - -## Install Chart - -To install the Chart into your Kubernetes cluster - -```bash -helm install --namespace "ceph-csi-rbd" --name "ceph-csi-rbd" ceph-csi/ceph-csi-rbd -``` - -After installation succeeds, you can get a status of Chart - -```bash -helm status "ceph-csi-rbd" -``` - -If you want to delete your Chart, use this command - -```bash -helm delete --purge "ceph-csi-rbd" -``` - -If you want to delete the namespace, use this command - -```bash -kubectl delete namespace ceph-csi-rbd -``` diff --git a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/NOTES.txt b/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/NOTES.txt deleted file mode 100644 index fc1e29ca5..000000000 --- a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/NOTES.txt +++ /dev/null @@ -1,2 +0,0 @@ -Examples on how to configure a storage class and start using the driver are here: -https://github.com/ceph/ceph-csi/tree/csi-v1.0/examples/rbd diff --git a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/_helpers.tpl b/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/_helpers.tpl deleted file mode 100644 index 0a2613d63..000000000 --- a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/_helpers.tpl +++ /dev/null @@ -1,90 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "ceph-csi-rbd.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "ceph-csi-rbd.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "ceph-csi-rbd.nodeplugin.fullname" -}} -{{- if .Values.nodeplugin.fullnameOverride -}} -{{- .Values.nodeplugin.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- printf "%s-%s" .Release.Name .Values.nodeplugin.name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s-%s" .Release.Name $name .Values.nodeplugin.name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "ceph-csi-rbd.provisioner.fullname" -}} -{{- if .Values.provisioner.fullnameOverride -}} -{{- .Values.provisioner.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- printf "%s-%s" .Release.Name .Values.provisioner.name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s-%s" .Release.Name $name .Values.provisioner.name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "ceph-csi-rbd.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "ceph-csi-rbd.serviceAccountName.nodeplugin" -}} -{{- if .Values.serviceAccounts.nodeplugin.create -}} - {{ default (include "ceph-csi-rbd.nodeplugin.fullname" .) .Values.serviceAccounts.nodeplugin.name }} -{{- else -}} - {{ default "default" .Values.serviceAccounts.nodeplugin.name }} -{{- end -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "ceph-csi-rbd.serviceAccountName.provisioner" -}} -{{- if .Values.serviceAccounts.provisioner.create -}} - {{ default (include "ceph-csi-rbd.provisioner.fullname" .) .Values.serviceAccounts.provisioner.name }} -{{- else -}} - {{ default "default" .Values.serviceAccounts.provisioner.name }} -{{- end -}} -{{- end -}} diff --git a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/nodeplugin-clusterrole.yaml b/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/nodeplugin-clusterrole.yaml deleted file mode 100644 index 091cc2201..000000000 --- a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/nodeplugin-clusterrole.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if .Values.rbac.create -}} -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ include "ceph-csi-rbd.nodeplugin.fullname" . }} - labels: - app: {{ include "ceph-csi-rbd.name" . }} - chart: {{ include "ceph-csi-rbd.chart" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -aggregationRule: - clusterRoleSelectors: - - matchLabels: - rbac.rbd.csi.ceph.com/aggregate-to-{{ include "ceph-csi-rbd.nodeplugin.fullname" . }}: "true" -rules: [] -{{- end -}} diff --git a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/nodeplugin-clusterrolebinding.yaml b/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/nodeplugin-clusterrolebinding.yaml deleted file mode 100644 index bf52865e1..000000000 --- a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/nodeplugin-clusterrolebinding.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if .Values.rbac.create -}} -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ include "ceph-csi-rbd.nodeplugin.fullname" . }} - labels: - app: {{ include "ceph-csi-rbd.name" . }} - chart: {{ include "ceph-csi-rbd.chart" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -subjects: - - kind: ServiceAccount - name: {{ include "ceph-csi-rbd.serviceAccountName.nodeplugin" . }} - namespace: {{ .Release.Namespace }} -roleRef: - kind: ClusterRole - name: {{ include "ceph-csi-rbd.nodeplugin.fullname" . }} - apiGroup: rbac.authorization.k8s.io -{{- end -}} diff --git a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml b/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml deleted file mode 100644 index 0db6f78e8..000000000 --- a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml +++ /dev/null @@ -1,182 +0,0 @@ -kind: DaemonSet -apiVersion: apps/v1 -metadata: - name: {{ include "ceph-csi-rbd.nodeplugin.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ include "ceph-csi-rbd.name" . }} - chart: {{ include "ceph-csi-rbd.chart" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - selector: - matchLabels: - app: {{ include "ceph-csi-rbd.name" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - updateStrategy: - type: OnDelete - template: - metadata: - labels: - app: {{ include "ceph-csi-rbd.name" . }} - chart: {{ include "ceph-csi-rbd.chart" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - spec: - serviceAccountName: {{ include "ceph-csi-rbd.serviceAccountName.nodeplugin" . }} - hostNetwork: true - hostPID: true - # to use e.g. Rook orchestrated cluster, and mons' FQDN is - # resolved through k8s service, set dns policy to cluster first - dnsPolicy: ClusterFirstWithHostNet - containers: - - name: driver-registrar - image: "{{ .Values.nodeplugin.registrar.image.repository }}:{{ .Values.nodeplugin.registrar.image.tag }}" - args: - - "--v=5" - - "--csi-address=/csi/{{ .Values.socketFile }}" - - "--kubelet-registration-path={{ .Values.socketDir }}/{{ .Values.socketFile }}" - lifecycle: - preStop: - exec: - command: [ - "/bin/sh", "-c", - 'rm -rf /registration/{{ .Values.driverName }} - /registration/{{ .Values.driverName }}-reg.sock' - ] - env: - - name: KUBE_NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - imagePullPolicy: {{ .Values.nodeplugin.registrar.image.pullPolicy }} - volumeMounts: - - name: socket-dir - mountPath: /csi - - name: registration-dir - mountPath: /registration - resources: -{{ toYaml .Values.nodeplugin.registrar.resources | indent 12 }} - - name: csi-rbdplugin - securityContext: - privileged: true - capabilities: - add: ["SYS_ADMIN"] - allowPrivilegeEscalation: true - image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}" - args : - - "--nodeid=$(NODE_ID)" - - "--type=rbd" - - "--nodeserver=true" - - "--endpoint=$(CSI_ENDPOINT)" - - "--v=5" - - "--drivername=$(DRIVER_NAME)" - - "--metricsport=8090" - - "--metricspath=/metrics" - - "--enablegrpcmetrics=false" - env: - - name: POD_IP - valueFrom: - fieldRef: - fieldPath: status.podIP - - name: DRIVER_NAME - value: {{ .Values.driverName }} - - name: NODE_ID - valueFrom: - fieldRef: - fieldPath: spec.nodeName - - name: CSI_ENDPOINT - value: "unix:/{{ .Values.socketDir }}/{{ .Values.socketFile }}" - imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} - volumeMounts: - - name: socket-dir - mountPath: {{ .Values.socketDir }} - - name: plugin-dir - mountPath: {{ .Values.pluginDir }} - mountPropagation: "Bidirectional" - - name: mountpoint-dir - mountPath: /var/lib/kubelet/pods - mountPropagation: "Bidirectional" - - mountPath: /dev - name: host-dev - - mountPath: /sys - name: host-sys - - mountPath: /lib/modules - name: lib-modules - readOnly: true - - name: ceph-csi-config - mountPath: /etc/ceph-csi-config/ - - name: keys-tmp-dir - mountPath: /tmp/csi/keys - resources: -{{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }} - - name: liveness-prometheus - image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}" - args: - - "--type=liveness" - - "--endpoint=$(CSI_ENDPOINT)" - - "--metricsport=8081" - - "--metricspath=/metrics" - - "--polltime=60s" - - "--timeout=3s" - imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }} - env: - - name: CSI_ENDPOINT - value: "unix:/{{ .Values.socketDir }}/{{ .Values.socketFile }}" - - name: POD_IP - valueFrom: - fieldRef: - fieldPath: status.podIP - volumeMounts: - - name: plugin-dir - mountPath: {{ .Values.socketDir }} - resources: -{{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }} - volumes: - - name: socket-dir - hostPath: - path: {{ .Values.socketDir }} - type: DirectoryOrCreate - - name: registration-dir - hostPath: - path: {{ .Values.registrationDir }} - type: Directory - - name: plugin-dir - hostPath: - path: {{ .Values.pluginDir }} - type: Directory - - name: mountpoint-dir - hostPath: - path: /var/lib/kubelet/pods - type: DirectoryOrCreate - - name: host-dev - hostPath: - path: /dev - - name: host-sys - hostPath: - path: /sys - - name: lib-modules - hostPath: - path: /lib/modules - - name: ceph-csi-config - configMap: - name: {{ .Values.configMapName | quote }} - - name: keys-tmp-dir - emptyDir: { - medium: "Memory" - } -{{- if .Values.nodeplugin.affinity }} - affinity: -{{ toYaml .Values.nodeplugin.affinity . | indent 8 -}} -{{- end -}} -{{- if .Values.nodeplugin.nodeSelector }} - nodeSelector: -{{ toYaml .Values.nodeplugin.nodeSelector | indent 8 -}} -{{- end -}} -{{- if .Values.nodeplugin.tolerations }} - tolerations: -{{ toYaml .Values.nodeplugin.tolerations | indent 8 -}} -{{- end -}} diff --git a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/nodeplugin-rules-clusterrole.yaml b/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/nodeplugin-rules-clusterrole.yaml deleted file mode 100644 index d80ebaea0..000000000 --- a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/nodeplugin-rules-clusterrole.yaml +++ /dev/null @@ -1,29 +0,0 @@ -{{- if .Values.rbac.create -}} -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ include "ceph-csi-rbd.nodeplugin.fullname" . }}-rules - labels: - app: {{ include "ceph-csi-rbd.name" . }} - chart: {{ include "ceph-csi-rbd.chart" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - rbac.rbd.csi.ceph.com/aggregate-to-{{ include "ceph-csi-rbd.nodeplugin.fullname" . }}: "true" -rules: - - apiGroups: [""] - resources: ["nodes"] - verbs: ["get", "list", "update"] - - apiGroups: [""] - resources: ["namespaces"] - verbs: ["get", "list"] - - apiGroups: [""] - resources: ["persistentvolumes"] - verbs: ["get", "list", "watch", "update"] - - apiGroups: ["storage.k8s.io"] - resources: ["volumeattachments"] - verbs: ["get", "list", "watch", "update"] - - apiGroups: [""] - resources: ["configmaps"] - verbs: ["get", "list"] -{{- end -}} diff --git a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/nodeplugin-service.yaml b/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/nodeplugin-service.yaml deleted file mode 100644 index da24ecb53..000000000 --- a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/nodeplugin-service.yaml +++ /dev/null @@ -1,25 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: {{ include "ceph-csi-rbd.nodeplugin.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: csi-metrics - chart: {{ include "ceph-csi-rbd.chart" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - selector: - app: {{ include "ceph-csi-rbd.name" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - ports: - - name: http-metrics - port: 8080 - protocol: TCP - targetPort: 8080 - - name: grpc-metrics - port: 8090 - protocol: TCP - targetPort: 8090 diff --git a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/nodeplugin-serviceaccount.yaml b/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/nodeplugin-serviceaccount.yaml deleted file mode 100644 index 36e1ee745..000000000 --- a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/nodeplugin-serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ -{{- if .Values.serviceAccounts.nodeplugin.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "ceph-csi-rbd.serviceAccountName.nodeplugin" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ include "ceph-csi-rbd.name" . }} - chart: {{ include "ceph-csi-rbd.chart" . }} - component: {{ .Values.nodeplugin.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -{{- end -}} diff --git a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/provisioner-clusterrole.yaml b/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/provisioner-clusterrole.yaml deleted file mode 100644 index 21745ed49..000000000 --- a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/provisioner-clusterrole.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if .Values.rbac.create -}} -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ include "ceph-csi-rbd.provisioner.fullname" . }} - labels: - app: {{ include "ceph-csi-rbd.name" . }} - chart: {{ include "ceph-csi-rbd.chart" . }} - component: {{ .Values.provisioner.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -aggregationRule: - clusterRoleSelectors: - - matchLabels: - rbac.rbd.csi.ceph.com/aggregate-to-{{ include "ceph-csi-rbd.provisioner.fullname" . }}: "true" -rules: [] -{{- end -}} diff --git a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/provisioner-clusterrolebinding.yaml b/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/provisioner-clusterrolebinding.yaml deleted file mode 100644 index 5a086103a..000000000 --- a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/provisioner-clusterrolebinding.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if .Values.rbac.create -}} -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ include "ceph-csi-rbd.provisioner.fullname" . }} - labels: - app: {{ include "ceph-csi-rbd.name" . }} - chart: {{ include "ceph-csi-rbd.chart" . }} - component: {{ .Values.provisioner.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -subjects: - - kind: ServiceAccount - name: {{ include "ceph-csi-rbd.serviceAccountName.provisioner" . }} - namespace: {{ .Release.Namespace }} -roleRef: - kind: ClusterRole - name: {{ include "ceph-csi-rbd.provisioner.fullname" . }} - apiGroup: rbac.authorization.k8s.io -{{- end -}} diff --git a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/provisioner-rolebinding.yaml b/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/provisioner-rolebinding.yaml deleted file mode 100644 index 23fa39fed..000000000 --- a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/provisioner-rolebinding.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if .Values.rbac.create -}} -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ include "ceph-csi-rbd.provisioner.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ include "ceph-csi-rbd.name" . }} - chart: {{ include "ceph-csi-rbd.chart" . }} - component: {{ .Values.provisioner.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -subjects: - - kind: ServiceAccount - name: {{ include "ceph-csi-rbd.serviceAccountName.provisioner" . }} - namespace: {{ .Release.Namespace }} -roleRef: - kind: Role - name: {{ include "ceph-csi-rbd.provisioner.fullname" . }} - apiGroup: rbac.authorization.k8s.io -{{- end -}} diff --git a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/provisioner-serviceaccount.yaml b/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/provisioner-serviceaccount.yaml deleted file mode 100644 index 893b43a9c..000000000 --- a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/templates/provisioner-serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ -{{- if .Values.serviceAccounts.provisioner.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "ceph-csi-rbd.serviceAccountName.provisioner" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ include "ceph-csi-rbd.name" . }} - chart: {{ include "ceph-csi-rbd.chart" . }} - component: {{ .Values.provisioner.name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -{{- end -}} diff --git a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/values.yaml b/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/values.yaml deleted file mode 100644 index a0fd973ef..000000000 --- a/deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd/values.yaml +++ /dev/null @@ -1,78 +0,0 @@ ---- -rbac: - create: true - -serviceAccounts: - attacher: - create: true - name: - nodeplugin: - create: true - name: - provisioner: - create: true - name: - -socketDir: /var/lib/kubelet/plugins/rbd.csi.ceph.com -socketFile: csi.sock -registrationDir: /var/lib/kubelet/plugins_registry -pluginDir: /var/lib/kubelet/plugins -driverName: rbd.csi.ceph.com -configMapName: ceph-csi-config - -nodeplugin: - name: nodeplugin - - registrar: - image: - repository: quay.io/k8scsi/csi-node-driver-registrar - tag: v1.1.0 - pullPolicy: IfNotPresent - resources: {} - - plugin: - image: - repository: quay.io/cephcsi/cephcsi - # for stable functionality replace canary with latest release version - tag: canary - pullPolicy: IfNotPresent - resources: {} - - nodeSelector: {} - - tolerations: [] - - affinity: {} - -provisioner: - name: provisioner - replicaCount: 3 - - provisioner: - image: - repository: quay.io/k8scsi/csi-provisioner - tag: v1.3.0 - pullPolicy: IfNotPresent - resources: {} - - attacher: - name: attacher - enabled: true - image: - repository: quay.io/k8scsi/csi-attacher - tag: v1.2.0 - pullPolicy: IfNotPresent - resources: {} - - snapshotter: - image: - repository: quay.io/k8scsi/csi-snapshotter - tag: v1.2.1 - pullPolicy: IfNotPresent - resources: {} - - nodeSelector: {} - - tolerations: [] - - affinity: {} diff --git a/docs/deploy-cephfs.md b/docs/deploy-cephfs.md index 80e5fe7ca..db0ab1a39 100644 --- a/docs/deploy-cephfs.md +++ b/docs/deploy-cephfs.md @@ -190,3 +190,14 @@ Dynamically povisioned volumes are deleted by the driver, when requested to do so. Statically provisioned volumes, from plugin versions less than or equal to 1.0.0, are a no-op when a delete operation is performed against the same, and are expected to be deleted on the Ceph cluster by the user. + +## Deployment with Helm + +The same requirements from the Kubernetes section apply here, i.e. Kubernetes +version, privileged flag and shared mounts. + +The Helm chart is located in `charts/ceph-csi-cephfs`. + +**Deploy Helm Chart:** + +[See the Helm chart readme for installation instructions.](../charts/ceph-csi-cephfs/README.md) diff --git a/docs/deploy-rbd.md b/docs/deploy-rbd.md index b075e485d..df84ebc5e 100644 --- a/docs/deploy-rbd.md +++ b/docs/deploy-rbd.md @@ -151,14 +151,8 @@ test the deployment further. The same requirements from the Kubernetes section apply here, i.e. Kubernetes version, privileged flag and shared mounts. -The Helm chart is located in `deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd`. +The Helm chart is located in `charts/ceph-csi-rbd`. **Deploy Helm Chart:** -```bash -helm install deploy/rbd/kubernetes/v1.14+/helm/ceph-csi-rbd -``` - -The Helm chart deploys all of the required resources to use the CSI RBD driver. -After deploying the chart you can verify the deployment using the instructions -above for verifying the deployment with Kubernetes +[See the Helm chart readme for installation instructions.](../charts/ceph-csi-rbd/README.md) diff --git a/scripts/lint-text.sh b/scripts/lint-text.sh index 81968983b..1586a7655 100755 --- a/scripts/lint-text.sh +++ b/scripts/lint-text.sh @@ -49,9 +49,9 @@ run_check '.*\.(ba)?sh' bash -n # Install via: pip install yamllint # disable yamlint check for helm charts -run_check '.*\.ya?ml' yamllint -s -d "{extends: default, rules: {line-length: {allow-non-breakable-inline-mappings: true}},ignore: deploy/*/kubernetes/*/helm/*/templates/*.yaml}" +run_check '.*\.ya?ml' yamllint -s -d "{extends: default, rules: {line-length: {allow-non-breakable-inline-mappings: true}},ignore: charts/*/templates/*.yaml}" # Install via: https://github.com/helm/helm/blob/master/docs/install.md -run_check '' helm lint --namespace=test deploy/*/kubernetes/*/helm/* +run_check '' helm lint --namespace=test charts/* echo "ALL OK."