diff --git a/ceph/templates/bin/_ceph-key.sh.tpl b/ceph/templates/bin/_ceph-key.sh.tpl index c6bd4c8196..df1da64615 100644 --- a/ceph/templates/bin/_ceph-key.sh.tpl +++ b/ceph/templates/bin/_ceph-key.sh.tpl @@ -25,7 +25,7 @@ function ceph_gen_key () { function kube_ceph_keyring_gen () { CEPH_KEY=$1 CEPH_KEY_TEMPLATE=$2 - sed "s|{{"{{"}} key {{"}}"}}|${CEPH_KEY}|" ${CEPH_TEMPLATES_DIR}/${CEPH_KEY_TEMPLATE} | base64 | tr -d '\n' + sed "s|{{"{{"}} key {{"}}"}}|${CEPH_KEY}|" ${CEPH_TEMPLATES_DIR}/${CEPH_KEY_TEMPLATE} | base64 -w0 | tr -d '\n' } function create_kube_key () { @@ -43,8 +43,7 @@ metadata: name: ${KUBE_SECRET_NAME} type: Opaque data: - ${CEPH_KEYRING_NAME}: | - $( kube_ceph_keyring_gen ${CEPH_KEYRING} ${CEPH_KEYRING_TEMPLATE} ) + ${CEPH_KEYRING_NAME}: $( kube_ceph_keyring_gen ${CEPH_KEYRING} ${CEPH_KEYRING_TEMPLATE} ) EOF } | kubectl create --namespace ${DEPLOYMENT_NAMESPACE} -f - fi diff --git a/ceph/templates/bin/_ceph-namespace-client-key.sh.tpl b/ceph/templates/bin/_ceph-namespace-client-key.sh.tpl index 33aeb9c72d..1f3c3fb7bf 100644 --- a/ceph/templates/bin/_ceph-namespace-client-key.sh.tpl +++ b/ceph/templates/bin/_ceph-namespace-client-key.sh.tpl @@ -31,8 +31,7 @@ metadata: name: "${PVC_CEPH_STORAGECLASS_USER_SECRET_NAME}" type: kubernetes.io/rbd data: - key: | - $(echo ${CEPH_KEY}) + key: $(echo ${CEPH_KEY}) EOF } | kubectl create --namespace ${kube_namespace} -f - } diff --git a/ceph/templates/bin/_ceph-storage-key.sh.tpl b/ceph/templates/bin/_ceph-storage-key.sh.tpl index d611960d66..54588864f5 100644 --- a/ceph/templates/bin/_ceph-storage-key.sh.tpl +++ b/ceph/templates/bin/_ceph-storage-key.sh.tpl @@ -25,7 +25,7 @@ function ceph_gen_key () { function kube_ceph_keyring_gen () { CEPH_KEY=$1 CEPH_KEY_TEMPLATE=$2 - sed "s|{{"{{"}} key {{"}}"}}|${CEPH_KEY}|" ${CEPH_TEMPLATES_DIR}/${CEPH_KEY_TEMPLATE} | base64 | tr -d '\n' + sed "s|{{"{{"}} key {{"}}"}}|${CEPH_KEY}|" ${CEPH_TEMPLATES_DIR}/${CEPH_KEY_TEMPLATE} | base64 -w0 | tr -d '\n' } CEPH_CLIENT_KEY=$(ceph_gen_key) @@ -46,8 +46,7 @@ metadata: name: ${KUBE_SECRET_NAME} type: Opaque data: - ${CEPH_KEYRING_NAME}: | - $( kube_ceph_keyring_gen ${CEPH_KEYRING} ${CEPH_KEYRING_TEMPLATE} ) + ${CEPH_KEYRING_NAME}: $( kube_ceph_keyring_gen ${CEPH_KEYRING} ${CEPH_KEYRING_TEMPLATE} ) EOF } | kubectl create --namespace ${DEPLOYMENT_NAMESPACE} -f - fi @@ -69,8 +68,7 @@ metadata: name: ${KUBE_SECRET_NAME} type: kubernetes.io/rbd data: - key: | - $( echo ${CEPH_KEYRING} | base64 | tr -d '\n' ) + key: $( echo ${CEPH_KEYRING} | base64 | tr -d '\n' ) EOF } | kubectl create --namespace ${DEPLOYMENT_NAMESPACE} -f - fi diff --git a/mariadb/templates/secrets-etc.yaml b/mariadb/templates/secrets-etc.yaml index 3213f17a7c..b9f83b58d7 100644 --- a/mariadb/templates/secrets-etc.yaml +++ b/mariadb/templates/secrets-etc.yaml @@ -22,5 +22,4 @@ metadata: name: mariadb-secrets type: Opaque data: - admin_user.cnf: | -{{ tuple "secrets/_admin_user.cnf.tpl" . | include "helm-toolkit.utils.template" | b64enc | indent 4 }} + admin_user.cnf: {{ tuple "secrets/_admin_user.cnf.tpl" . | include "helm-toolkit.utils.template" | b64enc }}