[occm] Add node-address-type annotation to control LB member IP selection#3130
[occm] Add node-address-type annotation to control LB member IP selection#3130carterpewpew wants to merge 1 commit into
Conversation
…tion When nodes have multiple network interfaces, the existing behavior of always preferring InternalIP for load balancer pool members can result in members being created with an IP address that does not belong to the configured member-subnet-id. This causes a mismatch because the Octavia API lets the address field take precedence over subnet_id. Add a new service annotation `loadbalancer.openstack.org/node-address-type` that allows users to set `ExternalIP` to reverse the address selection priority. When set, ExternalIP is tried first with a fallback to InternalIP. Default behavior (InternalIP first) is unchanged. Signed-off-by: Jathavedhan M <jathavedhan.m@ibm.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @carterpewpew. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What this PR does / why we need it:
When nodes have multiple network interfaces,
nodeAddressForLBalways prefers InternalIP for load balancer pool members. If the user configuresloadbalancer.openstack.org/member-subnet-idpointing to a subnet that corresponds to the node's ExternalIP, the pool members end up with an IP outside that subnet because the Octavia API lets the address field take precedence over subnet_id.This PR adds a new service annotation
loadbalancer.openstack.org/node-address-typethat allows users to setExternalIPto reverse the address selection priority. When set, ExternalIP is tried first with a fallback to InternalIP. Default behavior (InternalIP first) is unchanged.Which issue this PR fixes(if applicable):
fixes #3090
Special notes for reviewers:
ExternalIP(matchingcorev1.NodeExternalIP). Any other value (including empty/absent) preserves existing behavior.getSubnetIDForLBintentionally passes""for the new parameter since it auto-detects the subnet and should always use InternalIP for that purpose.applyNodeSecurityGroupIDForLBcaller is also updated so the security group is applied to the port matching the address actually used for the pool member.Release note: