Closed sylvainOL closed 3 weeks ago
This isn't what this feature is about, even if we have a naming conflict here. The feature you link is about skipping cloud provider altogether when loadBalancerClass
is set to allow some other controller to handle the Service. I'm fairly sure it's implemented in the generic cloud-provider code. The loadbalancer.openstack.org/class
on the OCCM level is a separate, OCCM-specific entity and will need to remain in annotations.
We could add some docs to clarify this, so I'll leave this open.
Yup, on the functional level this is solved, if you set loadBalancerClass
, the Service will be ignored by the OCCM: https://github.com/kubernetes/cloud-provider/blob/d2f5e75a5fd6d31f75b1519fe20879b1ab5347b8/controllers/service/controller.go#L876-L879
Hi @dulek,
first thanks for quick reply.
That's what I thought.
What I'd actually like is that OCCM could leverage the spec.loadBalancerClass
so it does answer only to its own request (the one matching loadBalancerClass
and not all of them / the one without loadBalancerClass
) like metallb can do for example (https://metallb.universe.tf/installation/)
Hi @dulek,
first thanks for quick reply.
That's what I thought.
What I'd actually like is that OCCM could leverage the
spec.loadBalancerClass
so it does answer only to its own request (the one matchingloadBalancerClass
and not all of them / the one withoutloadBalancerClass
) like metallb can do for example (https://metallb.universe.tf/installation/)
Oh, okay, I get it. Well, that change would need to be made in kubernetes/cloud-provider
and not here. Currently we directly use the controller from that project and the code I linked in the previous comment is making sure we ignore Services with loadBalancerClass
set. I can imagine cloud providers accepting --load-balancer-class
parameter and comparing with it if it's set.
Anyway to do it solely in OCCM would be pretty hard - you'd need to basically fork the original controller.
oki understood.
I'll take a look on the parent repo.
thanks again!
/close
@zetaab: Closing this issue.
Is this a BUG REPORT or FEATURE REQUEST?:
/kind feature
What happened:
After reading code and documentation, I'm not sure OCCM supports
spec.loadBalancerClass
from servicesWhat you expected to happen:
create a service with
spec.loadBalancerClass
set to one of OCCM configured loadBalancerClass.OCCM picks it and use it.
Anything else we need to know?:
it would help using OCCM in parallel with other load balancers