From e212e19020b607936b9122798594c05727a83237 Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Sat, 20 Dec 2025 00:38:16 -0600 Subject: [PATCH] improve spacing --- .../qbittorrent/templates/config-map.yaml | 7 +------ .../helm/vault/templates/config-map.yaml | 21 +++++-------------- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/clusters/cl01tl/helm/qbittorrent/templates/config-map.yaml b/clusters/cl01tl/helm/qbittorrent/templates/config-map.yaml index 7dda173f4..26909de2c 100644 --- a/clusters/cl01tl/helm/qbittorrent/templates/config-map.yaml +++ b/clusters/cl01tl/helm/qbittorrent/templates/config-map.yaml @@ -18,35 +18,30 @@ data: echo " " echo ">> Verifying required commands ..." + echo " " for i in $(seq 1 "$MAX_RETRIES"); do if apk update 2>&1 >/dev/null; then - echo " " echo ">> Attempt $i: Repositories are reachable" SUCCESS=true break else - echo " " echo ">> Attempt $i: Connection failed, retrying in 5 seconds ..." sleep 5 fi done if [ "$SUCCESS" = false ]; then - echo " " echo ">> ERROR: Could not connect to apk repositories after $MAX_RETRIES attempts, exiting ..." exit 1 fi if ! command -v curl 2>&1 >/dev/null; then - echo " " echo ">> Command curl could not be found, installing"; apk add --no-cache -q curl; if [ $? -eq 0 ]; then - echo " " echo ">> Installation successful" else - echo " " echo ">> Installation failed with exit code $?" exit 1 fi diff --git a/clusters/cl01tl/helm/vault/templates/config-map.yaml b/clusters/cl01tl/helm/vault/templates/config-map.yaml index e64b8abc8..235d1d5ad 100644 --- a/clusters/cl01tl/helm/vault/templates/config-map.yaml +++ b/clusters/cl01tl/helm/vault/templates/config-map.yaml @@ -18,42 +18,39 @@ data: echo " " echo ">> Verifying required commands ..." + echo " " for i in $(seq 1 "$MAX_RETRIES"); do if apk update 2>&1 >/dev/null; then - echo " " echo ">> Attempt $i: Repositories are reachable"; SUCCESS=true; break; else - echo " " echo ">> Attempt $i: Connection failed, retrying in 5 seconds ..."; sleep 5; fi; done; if [ "$SUCCESS" = false ]; then - echo " " echo ">> ERROR: Could not connect to apk repositories after $MAX_RETRIES attempts, exiting ..."; exit 1; fi + echo " " + if ! command -v jq 2>&1 >/dev/null; then - echo " " echo ">> Command jq could not be found, installing"; apk add --no-cache -q jq; if [ $? -eq 0 ]; then - echo " " echo ">> Installation successful"; else - echo " " echo ">> Installation failed with exit code $?"; exit 1; fi; fi; echo " "; - echo ">> Fetching Vault token"; + echo ">> Fetching Vault token ..."; export VAULT_TOKEN=$(vault write auth/approle/login role_id=$VAULT_APPROLE_ROLE_ID secret_id=$VAULT_APPROLE_SECRET_ID -format=json | jq -r .auth.client_token); echo " "; @@ -110,42 +107,34 @@ data: for i in $(seq 1 "$MAX_RETRIES"); do if apk update 2>&1 >/dev/null; then - echo " " echo ">> Attempt $i: Repositories are reachable"; SUCCESS=true; break; else - echo " " echo ">> Attempt $i: Connection failed, retrying in 5 seconds ..."; sleep 5; fi; done; if [ "$SUCCESS" = false ]; then - echo " " echo ">> ERROR: Could not connect to apk repositories after $MAX_RETRIES attempts, exiting ..."; exit 1; fi if ! command -v curl 2>&1 >/dev/null; then - echo " " echo ">> Command curl could not be found, installing"; apk add --no-cache -q curl; if [ $? -eq 0 ]; then - echo " " echo ">> Installation successful"; else - echo " " echo ">> Installation failed with exit code $?"; exit 1; fi; fi; - echo " " - echo ">> Message: $MESSAGE" - echo " " echo ">> Sending to NTFY ..." + echo ">> Message: $MESSAGE" HTTP_STATUS=$(curl \ --silent \ --write-out '%{http_code}' \