From 2f0b2f63df9ee6585cb0748931c1fd5ebfedd57f Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Mon, 20 Mar 2023 16:50:46 +0100 Subject: [PATCH 1/2] echo current configuration when running scripts --- deployment/scripts/branded-images.build.sh | 1 + deployment/scripts/cluster.maintenance.sh | 1 + deployment/scripts/cluster.reseed.sh | 1 + deployment/scripts/cluster.upgrade.sh | 1 + deployment/scripts/secret.generate.sh | 1 + deployment/scripts/secrets.decrypt.sh | 1 + deployment/scripts/secrets.encrypt.sh | 1 + 7 files changed, 7 insertions(+) diff --git a/deployment/scripts/branded-images.build.sh b/deployment/scripts/branded-images.build.sh index 62d2eb4af..84b656253 100755 --- a/deployment/scripts/branded-images.build.sh +++ b/deployment/scripts/branded-images.build.sh @@ -14,6 +14,7 @@ if [ -z ${CONFIGURATION} ]; then echo "You must provide a `CONFIGURATION` via environment variable" exit 1 fi +echo "Using CONFIGURATION=${CONFIGURATION}" # configuration DOCKERHUB_ORGANISATION=${DOCKERHUB_ORGANISATION:-"ocelotsocialnetwork"} diff --git a/deployment/scripts/cluster.maintenance.sh b/deployment/scripts/cluster.maintenance.sh index 1d2d4ecea..b64994e9b 100755 --- a/deployment/scripts/cluster.maintenance.sh +++ b/deployment/scripts/cluster.maintenance.sh @@ -9,6 +9,7 @@ if [ -z ${CONFIGURATION} ]; then echo "You must provide a `CONFIGURATION` via environment variable" exit 1 fi +echo "Using CONFIGURATION=${CONFIGURATION}" # configuration KUBECONFIG=${KUBECONFIG:-${SCRIPT_DIR}/../configurations/${CONFIGURATION}/kubeconfig.yaml} diff --git a/deployment/scripts/cluster.reseed.sh b/deployment/scripts/cluster.reseed.sh index 0f366bec8..9aba0a353 100755 --- a/deployment/scripts/cluster.reseed.sh +++ b/deployment/scripts/cluster.reseed.sh @@ -9,6 +9,7 @@ if [ -z ${CONFIGURATION} ]; then echo "You must provide a `CONFIGURATION` via environment variable" exit 1 fi +echo "Using CONFIGURATION=${CONFIGURATION}" # configuration KUBECONFIG=${KUBECONFIG:-${SCRIPT_DIR}/../configurations/${CONFIGURATION}/kubeconfig.yaml} diff --git a/deployment/scripts/cluster.upgrade.sh b/deployment/scripts/cluster.upgrade.sh index f0ae14ba6..44c905549 100755 --- a/deployment/scripts/cluster.upgrade.sh +++ b/deployment/scripts/cluster.upgrade.sh @@ -9,6 +9,7 @@ if [ -z ${CONFIGURATION} ]; then echo "You must provide a `CONFIGURATION` via environment variable" exit 1 fi +echo "Using CONFIGURATION=${CONFIGURATION}" # configuration KUBECONFIG=${KUBECONFIG:-${SCRIPT_DIR}/../configurations/${CONFIGURATION}/kubeconfig.yaml} diff --git a/deployment/scripts/secret.generate.sh b/deployment/scripts/secret.generate.sh index 7e8e011d0..cb788a7bd 100755 --- a/deployment/scripts/secret.generate.sh +++ b/deployment/scripts/secret.generate.sh @@ -12,6 +12,7 @@ if [ -z ${CONFIGURATION} ]; then echo "You must provide a `CONFIGURATION` via environment variable" exit 1 fi +echo "Using CONFIGURATION=${CONFIGURATION}" # configuration SECRET_FILE=${SCRIPT_DIR}/../configurations/${CONFIGURATION}/SECRET diff --git a/deployment/scripts/secrets.decrypt.sh b/deployment/scripts/secrets.decrypt.sh index f98f77917..a7a1328b1 100755 --- a/deployment/scripts/secrets.decrypt.sh +++ b/deployment/scripts/secrets.decrypt.sh @@ -12,6 +12,7 @@ if [ -z ${CONFIGURATION} ]; then echo "You must provide a `CONFIGURATION` via environment variable" exit 1 fi +echo "Using CONFIGURATION=${CONFIGURATION}" # configuration SECRET=${SECRET} diff --git a/deployment/scripts/secrets.encrypt.sh b/deployment/scripts/secrets.encrypt.sh index fabd91e98..57be1c16e 100755 --- a/deployment/scripts/secrets.encrypt.sh +++ b/deployment/scripts/secrets.encrypt.sh @@ -12,6 +12,7 @@ if [ -z ${CONFIGURATION} ]; then echo "You must provide a `CONFIGURATION` via environment variable" exit 1 fi +echo "Using CONFIGURATION=${CONFIGURATION}" # configuration SECRET=${SECRET} From d3c9a9ade9b88f3d7c580faf3c1457e91953ae2c Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Mon, 20 Mar 2023 20:55:34 +0100 Subject: [PATCH 2/2] dont use debug mode to prevent exposing secrets --- deployment/scripts/cluster.upgrade.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/deployment/scripts/cluster.upgrade.sh b/deployment/scripts/cluster.upgrade.sh index 1aec2cf18..1dfb674e4 100755 --- a/deployment/scripts/cluster.upgrade.sh +++ b/deployment/scripts/cluster.upgrade.sh @@ -15,5 +15,4 @@ helm --kubeconfig=${KUBECONFIG} upgrade ocelot \ --values ${VALUES} \ --set appVersion="${DOCKERHUB_OCELOT_TAG}" ${SCRIPT_DIR}/../src/kubernetes/ \ - --debug \ --timeout 10m \ No newline at end of file