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;