l7mp / stunner-gateway-operator

STUNner Kubernetes Gateway Operator
Apache License 2.0
15 stars 6 forks source link

AWS support: Fallback to LBStatus.Hostname with LBStatus.IP is not available #13

Closed rg0now closed 1 year ago

rg0now commented 1 year ago

The gateway operator is hardwired to use the .Status.loadBalancer.ingress[*].IP field for finding the public IP for a listener/gateway, but rather then assigning a public IP AWS rather creates a DNS FWDN and writes that into .Status.loadBalancer.ingress[*].Hostname. Correspondingly, the public IP is never written into the running-config, which breaks stuff all over the place (e.g., turncat k8s://...). This issue aims at fixing this.

The plan is to add a a heuristics here that when .IP is not available but .Hostname is then we fall back to the latter (see https://pkg.go.dev/k8s.io/api/core/v1#LoadBalancerIngress).