From 39509c1eb5e7c89108666327517c759dacf09a0b Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Tue, 22 Aug 2017 11:12:04 -0500 Subject: [PATCH] Ceph: update namespace client key script to hard fail sucessfully This PS updates the ceph namespace client key script to hard fail if it cannot get the admin storage key from the namespace ceph is deployed into. Change-Id: Ieefe6d800a678d721294561b25bbebc874cfa74d --- ceph/templates/bin/_ceph-namespace-client-key.sh.tpl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ceph/templates/bin/_ceph-namespace-client-key.sh.tpl b/ceph/templates/bin/_ceph-namespace-client-key.sh.tpl index 4b6b6f49a1..33aeb9c72d 100644 --- a/ceph/templates/bin/_ceph-namespace-client-key.sh.tpl +++ b/ceph/templates/bin/_ceph-namespace-client-key.sh.tpl @@ -20,6 +20,9 @@ set -ex ceph_activate_namespace() { kube_namespace=$1 + CEPH_KEY=$(kubectl get secret ${PVC_CEPH_STORAGECLASS_ADMIN_SECRET_NAME} \ + --namespace=${PVC_CEPH_STORAGECLASS_DEPLOYED_NAMESPACE} \ + -o json | jq -r '.data | .[]') { cat <