From 53bdbf00edd8072b4c6c03c2fa31e400e0961337 Mon Sep 17 00:00:00 2001 From: Chinasubbareddy Mallavarapu Date: Wed, 22 May 2019 14:29:31 -0500 Subject: [PATCH] CephFs-provisioner: fix cephfs storageclass This is to remove invalid key "userSecretName" for cephfs storageclass as we are having toruble to provision a pvc with cephfs storageclass with "userSecretName" key . Failed to provision volume with StorageClass "cephfs": invalid option "userSecretName" Change-Id: Ide52987c9f8ef8fc2327bf30747395e70dc05f99 --- ceph-provisioners/templates/job-cephfs-client-key.yaml | 4 ++-- ceph-provisioners/values.yaml | 4 ++-- helm-toolkit/templates/manifests/_ceph-storageclass.tpl | 7 +++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ceph-provisioners/templates/job-cephfs-client-key.yaml b/ceph-provisioners/templates/job-cephfs-client-key.yaml index 7f689aa86..86b07f81c 100644 --- a/ceph-provisioners/templates/job-cephfs-client-key.yaml +++ b/ceph-provisioners/templates/job-cephfs-client-key.yaml @@ -108,9 +108,9 @@ spec: fieldRef: fieldPath: metadata.namespace - name: PVC_CEPH_CEPHFS_STORAGECLASS_USER_SECRET_NAME - value: {{ .Values.storageclass.cephfs.parameters.userSecretName }} - - name: PVC_CEPH_CEPHFS_STORAGECLASS_ADMIN_SECRET_NAME value: {{ .Values.storageclass.cephfs.parameters.adminSecretName }} + - name: PVC_CEPH_CEPHFS_STORAGECLASS_ADMIN_SECRET_NAME + value: {{ .Values.secrets.keyrings.prov_adminSecretName }} - name: PVC_CEPH_CEPHFS_STORAGECLASS_DEPLOYED_NAMESPACE value: {{ .Values.storageclass.cephfs.parameters.adminSecretNamespace }} command: diff --git a/ceph-provisioners/values.yaml b/ceph-provisioners/values.yaml index d3a6107ad..9b43c1ff7 100644 --- a/ceph-provisioners/values.yaml +++ b/ceph-provisioners/values.yaml @@ -135,6 +135,7 @@ pod: secrets: keyrings: admin: ceph-client-admin-keyring + prov_adminSecretName: pvc-ceph-conf-combined-storageclass network: public: 192.168.0.0/16 @@ -238,8 +239,7 @@ storageclass: name: cephfs parameters: adminId: admin - userSecretName: pvc-ceph-cephfs-client-key - adminSecretName: pvc-ceph-conf-combined-storageclass + adminSecretName: pvc-ceph-cephfs-client-key adminSecretNamespace: ceph endpoints: diff --git a/helm-toolkit/templates/manifests/_ceph-storageclass.tpl b/helm-toolkit/templates/manifests/_ceph-storageclass.tpl index 1bd0a8c7f..2381bed0b 100644 --- a/helm-toolkit/templates/manifests/_ceph-storageclass.tpl +++ b/helm-toolkit/templates/manifests/_ceph-storageclass.tpl @@ -46,8 +46,7 @@ examples: name: cephfs parameters: admin_id: admin - user_secret_name: "pvc-ceph-cephfs-client-key" - admin_secret_name: "pvc-ceph-conf-combined-storageclass" + admin_secret_name: "pvc-ceph-cephfs-client-key" admin_secret_namespace: ceph usage: | {{- range $storageclass, $val := .Values.storageclass }} @@ -77,11 +76,11 @@ examples: kind: StorageClass metadata: name: cephfs - provisioner: ceph.com/rbd + provisioner: ceph.com/cephfs parameters: monitors: ceph-mon..svc.:6789 adminId: admin - adminSecretName: pvc-ceph-conf-combined-storageclass + adminSecretName: pvc-ceph-cephfs-client-key adminSecretNamespace: ceph */}}