diff --git a/deploy.sh b/deploy.sh index dcd89de..d86aba3 100755 --- a/deploy.sh +++ b/deploy.sh @@ -52,23 +52,7 @@ def get_ip(host, ctx): except: pass # Public APP endpoints must be sourced from Ingress status - if host in ["api.knoe.dev", "git.knoe.dev", "svc.knoe.dev", "api.0.knoe.dev", "db.0.knoe.dev"]: - return "pending" - - # Try Service fallback - try: - svcs = [] - if "git" in host: svcs = [("gitlab", "gitlab-nginx-ingress-controller")] - elif "api.knoe" in host or "svc.knoe" in host: svcs = [("knoe-system", "knoe-svc-kong-proxy")] - elif "0.knoe" in host: svcs = [("supabase", "kong"), ("supabase", "studio")] - - for ns, name in svcs: - out = subprocess.check_output(["kubectl", "--context", ctx, "get", "svc", "-n", ns, name, "-o", "json"], stderr=subprocess.DEVNULL, text=True) - ing = json.loads(out).get("status", {}).get("loadBalancer", {}).get("ingress", []) - if ing: - val = ing[0].get("ip") or ing[0].get("hostname") - if val: return val - except: pass + # api.knoe.dev, git.knoe.dev, svc.knoe.dev, api.0.knoe.dev, db.0.knoe.dev return "pending" app_ctx, db_ctx = get_config(sys.argv[1]) @@ -88,6 +72,17 @@ while time.time() - start < timeout: break time.sleep(10) +if time.time() - start >= timeout: + print("\nERROR: Timeout waiting for Supabase ingress reconciliation.") + print("Ingress Controller Diagnosis (kubectl get events -n supabase):") + try: + subprocess.run(["kubectl", "--context", app_ctx, "get", "events", "-n", "supabase", "--sort-by=.lastTimestamp"], check=False) + print("\nIngress Resource Status:") + subprocess.run(["kubectl", "--context", app_ctx, "describe", "ingress", "supabase-public", "-n", "supabase"], check=False) + except: + pass + sys.exit(1) + endpoints = [ ("api.knoe.dev", "knoe-svc-kong", "APP", app_ctx), ("git.knoe.dev", "GitLab", "APP", app_ctx), diff --git a/supabase/helm/render_supabase.py b/supabase/helm/render_supabase.py index a1fc5ec..393bd6f 100755 --- a/supabase/helm/render_supabase.py +++ b/supabase/helm/render_supabase.py @@ -824,7 +824,6 @@ def _build_overlay(cfg: configparser.ConfigParser, args: argparse.Namespace) -> "fullnameOverride": "supabase", "publicIngress": { "enabled": mode == "k8s", - "className": api_ingress_class if mode == "k8s" else "", "rules": rules_public, "annotations": { "kubernetes.io/ingress.class": api_ingress_class,