KubeAPI: Update secrets to be in conformance with k8s 1.8
Kubernetes 1.8 is stricter about the feilds in a secrets manifest, this PS updates OpenStack-Helm to be compliant. Change-Id: I9e19d07060d8517e0f4fd3056013191b1b4ba2da
This commit is contained in:
parent
ecdf097885
commit
61569d1b8b
@ -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
|
||||
|
@ -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 -
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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 }}
|
||||
|
Loading…
Reference in New Issue
Block a user