Skip to content

ignore LoadBalancer Service if loadBalancerClass is set to cilium #207

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

Closed
wants to merge 1 commit into from

Conversation

AshleyDumaine
Copy link
Contributor

@AshleyDumaine AshleyDumaine commented Apr 29, 2024

This PR is to support cases where the linode-CCM is installed but instead of backing a LoadBalancer Service via NodeBalancers, the user wants to leverage Cilium's BGP load balancing via specifying so on the Service's loadBalancerClass.
If the loadBalancerClass is not specified, the Service will by default be backed by a NodeBalancer as usual.

General:

  • Have you removed all sensitive information, including but not limited to access keys and passwords?
  • Have you checked to ensure there aren't other open or closed Pull Requests for the same bug/feature/question?

Pull Request Guidelines:

  1. Does your submission pass tests?
  2. Have you added tests?
  3. Are you addressing a single feature in this PR?
  4. Are your commits atomic, addressing one change per commit?
  5. Are you following the conventions of the language?
  6. Have you saved your large formatting changes for a different PR, so we can focus on your work?
  7. Have you explained your rationale for why this feature is needed?
  8. Have you linked your PR to an open issue

@AshleyDumaine AshleyDumaine force-pushed the lbclass-check branch 2 times, most recently from b93deac to c93b9d8 Compare April 29, 2024 20:49
@@ -185,6 +185,11 @@ func (l *loadbalancers) EnsureLoadBalancer(ctx context.Context, clusterName stri
sentry.SetTag(ctx, "cluster_name", clusterName)
sentry.SetTag(ctx, "service", service.Name)

if service.Spec.LoadBalancerClass != nil && *service.Spec.LoadBalancerClass == "io.cilium/bgp-control-plane" {
klog.Infof("Skipping NodeBalancer creation for Cilium LoadBalancerClass")
Copy link
Collaborator

@rahulait rahulait Apr 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should we also log service name here in log line?

Copy link
Collaborator

@rahulait rahulait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AshleyDumaine
Copy link
Contributor Author

Closing in favor of the CCM instead handling this LB class to create and share instance IPs without NBs

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.

2 participants