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}"