From 97a85359ff30fa60d63035f35569841c9c482349 Mon Sep 17 00:00:00 2001 From: "A. F. Dudley" Date: Thu, 22 Jan 2026 03:22:07 -0500 Subject: [PATCH] Fix helpers.py to use Caddy ingress instead of nginx The helm-charts-with-caddy branch had the Caddy manifest file but was still using nginx in the code. This change: - Switch install_ingress_for_kind() to use ingress-caddy-kind-deploy.yaml - Update wait_for_ingress_in_kind() to watch caddy-system namespace - Use correct label selector for Caddy ingress controller pods Co-Authored-By: Claude Opus 4.5 --- stack_orchestrator/deploy/k8s/helpers.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/stack_orchestrator/deploy/k8s/helpers.py b/stack_orchestrator/deploy/k8s/helpers.py index ef1fb922..08806586 100644 --- a/stack_orchestrator/deploy/k8s/helpers.py +++ b/stack_orchestrator/deploy/k8s/helpers.py @@ -71,8 +71,11 @@ def wait_for_ingress_in_kind(): w = watch.Watch() for event in w.stream( func=core_v1.list_namespaced_pod, - namespace="ingress-nginx", - label_selector="app.kubernetes.io/component=controller", + namespace="caddy-system", + label_selector=( + "app.kubernetes.io/name=caddy-ingress-controller," + "app.kubernetes.io/component=controller" + ), timeout_seconds=30, ): event_dict = cast(dict, event) @@ -80,22 +83,22 @@ def wait_for_ingress_in_kind(): if pod and pod.status and pod.status.container_statuses: if pod.status.container_statuses[0].ready is True: if warned_waiting: - print("Ingress controller is ready") + print("Caddy ingress controller is ready") return - print("Waiting for ingress controller to become ready...") + print("Waiting for Caddy ingress controller to become ready...") warned_waiting = True - error_exit("ERROR: Timed out waiting for ingress to become ready") + error_exit("ERROR: Timed out waiting for Caddy ingress to become ready") def install_ingress_for_kind(): api_client = client.ApiClient() ingress_install = os.path.abspath( get_k8s_dir().joinpath( - "components", "ingress", "ingress-nginx-kind-deploy.yaml" + "components", "ingress", "ingress-caddy-kind-deploy.yaml" ) ) if opts.o.debug: - print("Installing nginx ingress controller in kind cluster") + print("Installing Caddy ingress controller in kind cluster") utils.create_from_yaml(api_client, yaml_file=ingress_install)