From fdd5ee823fcdd831798f6f0ac4552c9d4ef7f8ce Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Fri, 19 Dec 2025 23:08:20 -0600 Subject: [PATCH] fix script --- clusters/cl01tl/helm/qbittorrent/templates/config-map.yaml | 3 ++- clusters/cl01tl/helm/vault/templates/config-map.yaml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/clusters/cl01tl/helm/qbittorrent/templates/config-map.yaml b/clusters/cl01tl/helm/qbittorrent/templates/config-map.yaml index 9010e6bfe..ecc32c64c 100644 --- a/clusters/cl01tl/helm/qbittorrent/templates/config-map.yaml +++ b/clusters/cl01tl/helm/qbittorrent/templates/config-map.yaml @@ -10,9 +10,10 @@ metadata: data: update.sh: | API_ENDPOINT="http://localhost:8080/api/v2"; + MAX_RETRIES=5 SUCCESS=false - for i in {1..5}; do + for i in $(seq 1 "$MAX_RETRIES"); do if apk update --short &> /dev/null; then echo ">> Attempt $i: Repositories are reachable" SUCCESS=true diff --git a/clusters/cl01tl/helm/vault/templates/config-map.yaml b/clusters/cl01tl/helm/vault/templates/config-map.yaml index 55dd2f421..8059b09f8 100644 --- a/clusters/cl01tl/helm/vault/templates/config-map.yaml +++ b/clusters/cl01tl/helm/vault/templates/config-map.yaml @@ -9,9 +9,10 @@ metadata: app.kubernetes.io/part-of: {{ .Release.Name }} data: snapshot.sh: | + MAX_RETRIES=5 SUCCESS=false - for i in {1..5}; do + for i in $(seq 1 "$MAX_RETRIES"); do if apk update --short &> /dev/null; then echo ">> Attempt $i: Repositories are reachable"; SUCCESS=true;