F5Networks / k8s-bigip-ctlr

Repository for F5 Container Ingress Services for Kubernetes & OpenShift.
Apache License 2.0
364 stars 195 forks source link

Requesting Specific IPs for LoadBalancer ServiceType #3467

Closed smangelkramer closed 4 months ago

smangelkramer commented 4 months ago

Title

Requesting Specific IPs for LoadBalancer ServiceType

Description

Allow a specific IP to be allocated for a load balancer service.

Actual Problem

At the moment, only one pool can be referenced. This is disadvantageous and complex to maintain when /32 pools are created.

Solution Proposed

Assign a specific IP to the LoadBalancer service object with an annotation. If this is already assigned, a warning should be issued.

Alternatives

Creating pools with 1 IP (/32) - which is hacky and actually nonsense.

Additional context

.

trinaths commented 4 months ago

@smangelkramer Please share RFE examples, CIS config to automation_toolchain_pm@f5.com

dronenb commented 4 months ago

@smangelkramer somebody can correct me if I'm wrong, but I believe this is already an (undocumented) feature as of 2.16.1:

mikeoleary commented 4 months ago

@dronenb, @smangelkramer, my understanding was the same. The annotation of "cis.f5.com/ip" is supposed to give you a static IP. I'll follow this issue and test myself, and update with findings. Please update if you know the answer.

smangelkramer commented 4 months ago

@dronenb, @mikeoleary Yes, that is absolutely correct. I contacted the F5 product team and was made aware of the (undocumented) feature, which we have now (today) successfully tested. It is exactly the feature we needed. A Jira task was created internally for F5 to update the documentation. Many thanks for your support.

mikeoleary commented 4 months ago

@smangelkramer that is great to hear. According to docs, you must have ipam=true in your CIS deployment. Is that correct, still? Can we stop running the IPAM controller if we use this annotation?

dronenb commented 4 months ago

I am curious about the IPAM controller as well. Additionally, I would like clarification on how IP conflicts can be prevented, and whether or not it is now possible to have two separate LB's using different ports but the same IP, which I believe was not previously possible.

mikeoleary commented 4 months ago

@smangelkramer i can confirm now too. I tested using CIS v2.17, and I do not need to run IPAM controller if I use this annotation to set the IP address.

@dronenb i didn’t test your scenario of 2 different services of type LB, with the same IP address in the annotation, but listening in different ports. I think you should test this but it sounds like a separate issue.

trinaths commented 4 months ago

Its a documentation update. The feature to support static IP for svcType LB is available with annotation.