-
Notifications
You must be signed in to change notification settings - Fork 28
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
Support loadbalancerClass #100
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29c2b6c
to
43bd8e8
Compare
Signed-off-by: lubronzhan <[email protected]>
Signed-off-by: lubronzhan <[email protected]>
Signed-off-by: lubronzhan <[email protected]>
Signed-off-by: lubronzhan <[email protected]>
Signed-off-by: lubronzhan <[email protected]>
a733ff0
to
16098bf
Compare
c71b570
to
953caf2
Compare
Signed-off-by: lubronzhan <[email protected]>
953caf2
to
47548a7
Compare
32e603d
to
e9a6dc8
Compare
Signed-off-by: lubronzhan <[email protected]>
e9a6dc8
to
a41b3a1
Compare
Is this ready to roll? |
Yes, I tested with kube-vip setting lbclassOnly as well. Just make sure you are ok with the change
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fix #61
Now if kube-vip-cloud-provider set env variable
KUBEVIP_ENABLE_LOADBALANCERCLASS: true
, then it will only reconcile service that has :spec.loadbalancerClass: kube-vip.io/kube-vip-class
To implement that, I added a second service controller, since cloud-provider will ignore service type LB with loadbalancerclass set. Then if
KUBEVIP_ENABLE_LOADBALANCERCLASS
is set to true, it will only start the newly added custom service controller. If not set, it will not start this newly added custom service controller.In the future, we can just get rid of the cloud-provider controller completely, and just use this new custom service controller to reconcile all service type LB.
Manual Test
Without loadbalancerclass
Not adding loadbalancerclass, the log is still the same as previously. log when creating lb svc without loadbalancerclass,
no log when creating lb svc loadbalancerclass
With loadbalancerclass
Apply a lb without lbc, it will just ignore
Applying a lb with correct lbc, it will reconcile
Applying a lb with incorrect lbc, it will ignore