From 1be02ec30556f6e8df1ca78e9b926cdcb2b3da42 Mon Sep 17 00:00:00 2001 From: David Hoese <david.hoese@ssec.wisc.edu> Date: Wed, 8 Jul 2020 11:15:48 -0500 Subject: [PATCH] Pass password and erlang cookie on upgrade correctly --- .gitlab-ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a97be93..e2cfd7d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -112,7 +112,11 @@ deploy_prod_rabbit: - sec_info=$(kubectl --kubeconfig $kubeconfig get secret --namespace geosphere-test geosphere-rabbit-rabbitmq || echo "") - echo $sec_info - auth_sec="geosphere-rabbit-rabbitmq" - - if [ "$sec_info" != "" ]; then EXTRA_ARGS="--set auth.existingPasswordSecret=$auth_sec --set auth.existingErlangSecret=$auth_sec"; fi + - if [ "$sec_info" != "" ]; then + pw=$(kubectl --kubeconfig $kubeconfig get secret --namespace geosphere-test geosphere-rabbit-rabbitmq -o jsonpath="{.data.rabbitmq-password}" | base64 -d); + ec=$(kubectl --kubeconfig $kubeconfig get secret --namespace geosphere-test geosphere-rabbit-rabbitmq -o jsonpath="{.data.rabbitmq-erlang-cookie}" | base64 -d); + EXTRA_ARGS="--set auth.password=$pw --set auth.erlangCookie=$ec"; + fi - echo $EXTRA_ARGS # install third-party rabbitmq server - helm repo add bitnami "https://charts.bitnami.com/bitnami" -- GitLab