-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
feat(helm): Add loadBalancerClass #9562
feat(helm): Add loadBalancerClass #9562
Conversation
This issue is currently awaiting triage. If Ingress contributors determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Hi @LucasBoisserie. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@LucasBoisserie, it will help if you create an issue first and post the details for everyone to read and triage.
|
@longwuyuan , the issue already exist and is available here: #8716
The option appears in Kubernetes 1.21 (stable in 1.24). In my case, i use EKS and EKS default load balancer implementation is Kubernetes in-tree cloud controller which is stop accepting new features and will be removed in a future release of Kubernetes (https://github.com/kubernetes/cloud-provider-aws#migration-from-in-tree). To avoid having 2 controllers reconcile the service type LoadBalancer and create an infinite loop, we can use
It's not breaking change because
Targeting of which Loadbalancer controller must reconcile service type LoadBalancer. It's the same behavior than ingressClass |
Humble request is please edit the description of the PR and add all the helpful information, with any addition elaborate story on it there @LucasBoisserie |
@longwuyuan, I edit the PR's description |
@LucasBoisserie thanks for editing description. My next thoughts are this ;
I am not an expert so I will read more. So waiting for others to comment and see how this goes. Project is in stabilization phase but almost done on that. |
@longwuyuan I have kube-vip which works as a loadbalancer and metalLB. I would like to choose which LB to use by my service and nginx ingress helm chart misses that. |
Hi, +1 for this feature. This is needed for MetalLB use-case:
|
My use-case for this is to expose ingress-nginx over tailscale using their new operator. A lot of people would like this functionality for all sorts of reasons, and it's 100% backwards compatible with existing behavior, I don't see any reason why it wouldn't be accepted. |
I can't get the AWS LoadBalancer Controller to properly work without using the |
@cskinfill i'm using helm hooks and kustomize right not to achieve that. |
Bump. It would be very helpful to have support of that. My usecase is cilium (bgp) + metallb (l2). |
I would also like this, my reason being the default load balancer provisioned is an AWS "Classic" load balancer. With an AWS "Network" load balancer (NLB) I can have a static IP address from an existing pool of addresses, the "Classic" type cannot have a static IP address. In theory the performance could also be better with an AWS NLB. |
@simonsCatalyst the manifest https://kubernetes.github.io/ingress-nginx/deploy/#aws creates NLB |
Hi @longwuyuan I am aware I could have done this outside the Helm chart, but this PR deals with adding functionality to the Helm chart - which I (And I think many others will) very much appreciate. Cheers Simon |
|
Look at this diff @longwuyuan. It's like 5 lines of code + some docs. |
@JuniorJPDJ @simonsCatalyst @LucasBoisserie the idea is to help push this PR forward. If you are ignoring that you need to rebase , it does not help.
|
@JuniorJPDJ @simonsCatalyst @LucasBoisserie also to help triage this, PTAL at #9209 . My curiosity is the question asked by @strongjz there. Do you have any comments related to the question. Is that question still relevant to this PR as well ? I would think we need to close that older PR #9209 as it could be a likely duplicate and also for the lack of tracktion on it |
I've just rebase and push. I also removed field For the question asked by @strongjz here: #9209 (comment) I think the question is not correct because Maybe the real question is for I make the same test as you on EKS cluster: On first install without any params, we see in-tree service loadbalancer controller reconcile service. On the second install with loadBalancerClass set, service loadbalancer is reconcile by aws-loadbalancer-controller reconcile. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: LucasBoisserie, strongjz The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Bit late to the party, but would have been nice to also implement this for the internal service. |
@@ -28,6 +28,9 @@ spec: | |||
{{- if .Values.controller.service.loadBalancerSourceRanges }} | |||
loadBalancerSourceRanges: {{ toYaml .Values.controller.service.loadBalancerSourceRanges | nindent 4 }} | |||
{{- end }} | |||
{{- if .Values.controller.service.loadBalancerClass }} | |||
loadBalancerClass: {{ toYaml .Values.controller.service.loadBalancerClass }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value controller.service.loadBalancerClass
is a string. Why toYaml
is used here?
What this PR does / why we need it:
Add loadBalancerClass params on svc: https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class
The option appears in Kubernetes 1.21 (stable in 1.24).
We need this field to use another load balancer implementation than the cloud provider default.
In my case, i use EKS and EKS default load balancer implementation is Kubernetes in-tree cloud controller which is stop accepting new features and will be removed in a future release of Kubernetes (https://github.com/kubernetes/cloud-provider-aws#migration-from-in-tree).
AWS create a new controller to managed service type LoadBalancer (https://kubernetes-sigs.github.io/aws-load-balancer-controller/) and recommend to use it to have latest feature releases (https://docs.aws.amazon.com/eks/latest/userguide/aws-load-balancer-controller.html).
To avoid having 2 controllers reconcile the service type LoadBalancer and create an infinite loop, we can use loadbalancerClass to specify which controller is targeted. It's like the ingressClass but for Service.
Types of changes
Which issue/s this PR fixes
fixes #8716
How Has This Been Tested?
EKS cluster in
1.24.7
with aws-load-balancer-controller in2.4
Checklist:
Does my pull request need a release note?