Merge "Ceph: update namespace client key script to hard fail sucessfully"

This commit is contained in:
Jenkins 2017-08-25 13:26:47 +00:00 committed by Gerrit Code Review
commit d76fe73b40

View File

@ -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 <<EOF
apiVersion: v1
@ -29,9 +32,7 @@ metadata:
type: kubernetes.io/rbd
data:
key: |
$(kubectl get secret ${PVC_CEPH_STORAGECLASS_ADMIN_SECRET_NAME} \
--namespace=${PVC_CEPH_STORAGECLASS_DEPLOYED_NAMESPACE} \
-o json | jq -r '.data | .[]')
$(echo ${CEPH_KEY})
EOF
} | kubectl create --namespace ${kube_namespace} -f -
}