From e86de1b6a9ec81cac710d2ff321742580a53691c Mon Sep 17 00:00:00 2001 From: philipp Date: Sat, 18 Apr 2026 11:25:59 +0200 Subject: [PATCH] Fix orderbooks deploy bootstrap registry auth --- scripts/deploy/bootstrap_orderbooks_k8s.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/deploy/bootstrap_orderbooks_k8s.sh b/scripts/deploy/bootstrap_orderbooks_k8s.sh index a807022..fa95571 100755 --- a/scripts/deploy/bootstrap_orderbooks_k8s.sh +++ b/scripts/deploy/bootstrap_orderbooks_k8s.sh @@ -96,13 +96,18 @@ if [[ -z "${FORGEJO_TOKEN:-}" ]]; then fi if [[ -z "${REGISTRY_HOST:-}" ]]; then - if [[ -n "${REGISTRY_DOMAIN:-}" ]]; then + if [[ -n "${REGISTRY_DOMAIN:-}" && "${REGISTRY_DOMAIN}" != *'${'* ]]; then REGISTRY_HOST="$REGISTRY_DOMAIN" else - echo "missing registry host" >&2 - exit 1 + REGISTRY_HOST="registry.doran.133011.xyz" fi fi + +shared_registry_user="$(kubectl -n registry get secret registry-secrets -o jsonpath='{.data.htpasswd}' 2>/dev/null | base64 -d 2>/dev/null | cut -d: -f1 || true)" +if [[ -n "$shared_registry_user" ]]; then + REGISTRY_USERNAME="$shared_registry_user" +fi + : "${REGISTRY_USERNAME:?missing registry username}" : "${REGISTRY_PASSWORD:?missing registry password}"