Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New service class filtering behavior #855

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

p-strusiewiczsurmacki-mobica
Copy link
Contributor

This PR introduces new behavior for LoadBalancer Class Name service filtering. With this new implementation only services that have LB class name set to the value configured in kube-vip (LoadBalancerClassName flag) will be processed. This is consistent with implementation in e.g. MetalLB or with how the ingress classes behave.

However this might be a braking change, so it is implemented (for now) as an option. 'Legacy' behavior is a default and can be disabled by setting LoadBalancerClassLegacyHandling config flag to false. In one of next releases this could become a default setting, and then legacy behavior could be removed altogether.

Fixes #851

Signed-off-by: Patryk Strusiewicz-Surmacki <patryk-pawel.strusiewicz-surmacki@external.telekom.de>
@thebsdbox
Copy link
Collaborator

This looks OK to me, would it be possible to add a service test to check for labels?

@p-strusiewiczsurmacki-mobica
Copy link
Contributor Author

Hi @thebsdbox, I am not really sure. I've just tried to play with the tests a bit, but I see 2 issues:

  1. I've tried to add LoadbalancerClass to the existing tests, just to check if those would pass with default kube-vip.io/kube-vip-class class, but it seems that v0.9.0 of kube-vip-cloud-provider discards any service which has LoadbalancerClass set. Would need to try with current main as it seems some additional controller for loadbalancer classes was added. As service has no loadbalancer IP assigned by cloud-provider, it is discarded by kube-vip as well and the test fails.

  2. I can't see any clear way of determining if service was processed or discarded by kube-vip (other than reading logs, obviously :D). I've tried checking ip neighbour on the kind nodes, but I am not sure if this is a proper way to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[LoadBalancerClass] Better defaulting for Service objects
2 participants