STRRL / cloudflare-tunnel-ingress-controller

🚀 Expose the website directly into the internet! The Kuberntes Ingress Controller based on Cloudflare Tunnel.
MIT License
644 stars 37 forks source link

support reporting external hostname #68

Closed halkeye closed 5 months ago

halkeye commented 9 months ago

I'm using https://ori-edge.github.io/k8s_gateway/ to report exposed ingress's dns entries

Right now this controller is reporting that its the default load balancer, and not the external dns, so it resolves to an ingress controller which is not actually handling the request.

I'm going to be trying to create an issue/PR for k8s_gateway to be able to filter out certain ingress classes, but this should also report correct info.

based on https://github.com/tailscale/tailscale/blob/5812093d31c8a7f9c5e3a455f0fd20dcc011d8cd/cmd/k8s-operator/svc.go#L249C13-L251C3 I would think you'd want to add

ingress.Status.LoadBalancer.Ingress = []networkingv1.IngressLoadBalancerIngress{{Hostname: "/*external tunnel cname?*/"}}

to pkg/controller/ingress-controller.go but i'm not certain, and not sure you have the tunnel uuids in there anyways.

YDKK commented 9 months ago

Some CD tools (e.g. Argo CD) check for Ingress deployment completion and health by reading ingress.status.loadBalancer.ingress. https://github.com/argoproj/gitops-engine/blob/aba38192fb16c35a6731717d81454a219565bcce/pkg/health/health_ingress.go#L8-L15

So if this value is not set, Ingress health will be stuck at Progressing on the dashboard of those tools. image

UnstoppableMango commented 9 months ago

This is also annoying for Pulumi users, where the deployment will timeout waiting for the status to be updated unless you apply pulumi.com/skipAwait: 'true' to every ingress.

Hopefully should be fixed with #69

toastedcrumpets commented 8 months ago

Just adding a +1 here, I have an "issue" with ArgoCD failing to see that the ingress was applied successfully as outlined by @YDKK describes. Hopefully #69 gets its merge review!