stakater / Forecastle

Forecastle is a control panel which dynamically discovers and provides a launchpad to access applications deployed on Kubernetes – [✩Star] if you're using it!
https://stakater.com
Apache License 2.0
609 stars 62 forks source link

[ENHANCE] forecastle should read the ingress host from the status instead of the spec #440

Open visheyra opened 2 months ago

visheyra commented 2 months ago

Is your feature request related to a problem? Please describe. When using specific ingress controllers (like the tailscale one), the address discovered, is the one defined in the ingress and not the one set in the status. This leads to incorrect url being discovered, while reading from the status field should always grant the correct url as the ingress controller is responsible of managing that field. Kubectl (when using the command kubectl get ing -o wide) is reading address from the status field as well.

Describe the solution you'd like Discover the url from the status field instead of the host / tls field.

Describe alternatives you've considered The current alternative solution is to set the url manually

Additional context Adding screenshot from my kubectl output and my forecastle display

Screenshot from 2024-09-14 14-27-12 Screenshot from 2024-09-14 14-26-38

bnallapeta commented 2 months ago

@visheyra

Upon checking, we found that not all Ingress Controllers populate the same way. Some populate status.ip and some status.hostname and some none.

I think a reliable way to do this would be to first rely on the status and then fall back to spec if status isn't available.

Thoughts?

aslafy-z commented 2 months ago

ingress-nginx publishes by default the service LoadBalancer IP or hostname to the ingresses statuses. This is most of the time, not the value we want forecastle to use. I would do the other way around, default on ingresses hosts, or if unset fallback to status.loadbalancer.hostname, then ip.

MuneebAijaz commented 1 month ago

ingress-nginx publishes by default the service LoadBalancer IP or hostname to the ingresses statuses. This is most of the time, not the value we want forecastle to use. I would do the other way around, default on ingresses hosts, or if unset fallback to status.loadbalancer.hostname, then ip.

PRs are welcome for this change if this is the finalized workflow

aslafy-z commented 2 weeks ago

@visheyra #446 may solve your issue. As no TLS host will be found, Forecastle with default with the http:// protocol. Does that fit your use case? Or we may want to add an additional annotation like forecastle.stakater.com/protocol which would allow forcing the protocol to https:// for eg.