kubernetes / cloud-provider-openstack

Apache License 2.0
623 stars 611 forks source link

[OCCM] Octavia Regression - Node's ExternalIP is prefered instead of the InternalIP one #2718

Closed Lucasgranet closed 1 week ago

Lucasgranet commented 1 week ago

Is this a BUG REPORT or FEATURE REQUEST?: /kind bug

What happened: The default behavior of choosing the InternalIP of a Node, as the Octavia Member's IP, is not working. The ExternalIP is preferred by default.

What you expected to happen: The InternalIP should be used first if exists. If not, the ExternalIP should be return (as explain in the comments). https://github.com/kubernetes/cloud-provider-openstack/blob/master/pkg/openstack/loadbalancer.go#L376

How to reproduce it: Have K8S Nodes with an ExternalIP and an InternalIP filled in the Status.

Anything else we need to know?: Introduce by #2688

Environment: OpenStack instances with External and Internal IPs.