Ceph: ensure keyring jobs only run on initial deployment

This PS ensures that the keyring jobs only run on initial deployment.

Change-Id: Id952e77de6eea2b75367c689eb39f7bace6e9572
This commit is contained in:
portdirect 2018-01-19 18:31:57 -05:00 committed by Pete Birley
parent 07d99d9748
commit ed9d315bf8
2 changed files with 15 additions and 0 deletions

View File

@ -18,6 +18,8 @@ limitations under the License.
set -ex
{{ if .Release.IsInstall }}
function ceph_gen_key () {
python ${CEPH_GEN_DIR}/ceph-key.py
}
@ -51,3 +53,9 @@ EOF
#create_kube_key <ceph_key> <ceph_keyring_name> <ceph_keyring_template> <kube_secret_name>
create_kube_key $(ceph_gen_key) ${CEPH_KEYRING_NAME} ${CEPH_KEYRING_TEMPLATE} ${KUBE_SECRET_NAME}
{{ else }}
echo "Not touching ${KUBE_SECRET_NAME} as this is not the initial deployment"
{{- end -}}

View File

@ -17,6 +17,7 @@ limitations under the License.
*/}}
set -ex
{{ if .Release.IsInstall }}
function ceph_gen_key () {
python ${CEPH_GEN_DIR}/ceph-key.py
@ -75,3 +76,9 @@ EOF
}
#create_kube_storage_key <ceph_key> <kube_secret_name>
create_kube_storage_key ${CEPH_CLIENT_KEY} ${CEPH_STORAGECLASS_ADMIN_SECRET_NAME}
{{ else }}
echo "Not touching ${KUBE_SECRET_NAME} as this is not the initial deployment"
{{ end }}