From 3c1ef8bc7dc0341581037ae35f2cdac03daea40e Mon Sep 17 00:00:00 2001 From: Stephen Schuresko Date: Thu, 24 Sep 2026 09:31:26 -0400 Subject: [PATCH] Auto-port-forward registry on push and enhance dashboard noscript fallback --- Makefile | 19 +++++++++++++++- cmd/zero-scale-dashboard/dashboard.html | 29 ++++++++++++++++++------- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index f928eba..ff3cc3c 100644 --- a/Makefile +++ b/Makefile @@ -95,7 +95,24 @@ image: build push: image @echo "==> Pushing Docker image $(IMAGE)..." - docker push $(IMAGE) + @PF_PID=""; \ + if ! curl -s --connect-timeout 1 http://localhost:32000/v2/ >/dev/null 2>&1; then \ + echo "--> Setting up temporary port-forward to container-registry on port 32000..."; \ + kubectl port-forward -n container-registry svc/registry 32000:5000 >/dev/null 2>&1 & \ + PF_PID=$$!; \ + for i in 1 2 3 4 5 6 7 8 9 10; do \ + if curl -s --connect-timeout 1 http://localhost:32000/v2/ >/dev/null 2>&1; then \ + break; \ + fi; \ + sleep 0.5; \ + done; \ + fi; \ + docker push $(IMAGE); \ + PUSH_STATUS=$$?; \ + if [ -n "$$PF_PID" ]; then \ + kill "$$PF_PID" 2>/dev/null || true; \ + fi; \ + exit $$PUSH_STATUS restart: @echo "==> Restarting deployment $(GATEWAY_APP)..." diff --git a/cmd/zero-scale-dashboard/dashboard.html b/cmd/zero-scale-dashboard/dashboard.html index b9ffe71..774af02 100644 --- a/cmd/zero-scale-dashboard/dashboard.html +++ b/cmd/zero-scale-dashboard/dashboard.html @@ -15,8 +15,7 @@ - - +