-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Extra parameter to force usage of only one ALB per cluster #830
Extra parameter to force usage of only one ALB per cluster #830
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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. I understand the commands that are listed here. |
Hi @marcosdiez. Thanks for your PR. I'm waiting for a kubernetes-sigs or 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. |
Just for the record, I just signed the CLA |
@marcosdiez - this is very cool.
Does this mean if there a conflict the new rule will take precedence or does the old one? |
@marcosdiez However, i'm a little opposed to this approach given it's limitations.(nice work though 😄 ) BTW, i'm currently working on a different solution called ingress group to solve this problem based a different approach. The basic idea is add another annotation called ingressGroup, and ingress belongs to same group are merged and reconciled together(result in single alb)
Based on this, we can have admission controllers to controller "who" can create ingress to join "which" ingressGroup for k8s envrionments that are shared. Also, this helps solve the pain-point of path / port based configurations. e.g.
|
@ChristopherHeim my code adds new rules and modifies existing ones, no matter if it created it or not (it does not track which rules it created). So conflicting rules will be overwritten. |
@M00nF1sh your proposal is clearly better then mine. It's much more flexible without any added downsides. It's properly designed and now that I know about it, I also believe merging this PR is not a good idea. The problem is that your ETA is middle march and I can't wait for it. Porting from one container to the other is trivial. Just adding the annotations you described and removing the The only issue with this approach is that it has the same disadvantages as mine:
Both are solvable. Do you have any plans on them ? By the way, nice design. I couldn't do better. |
@marcosdiez
|
Small status update: I just found a bug that was causing issues with two ingress rules with the same name on different namespaces. It has been fixed. The container image has been updated as well with the same name. The old broken on has been renamed to This is clearly not a best practice but assigning versions to a fork that has it's days counted does not worth the trouble. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: marcosdiez 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 |
Due to reasons beyond my control, I had to withdraw my pull request. If they get solved, I'll put it back when possible. Sorry. |
Was looking forward to this PR being merged 😢 . @marcosdiez please can I ask why the pr was withdrawn even after it has been approved? |
What happened @marcosdiez ? It was already approved :( Do you authorize anyone to use your PR to merge it? |
Do either of these solutions solve the problem of if you have target groups that have different health endpoints? Right now the healthcheck path is in the annotation, what would take this a HUGE step forward is to move it to the backend parameter. So we could do something like:
With this I could specify multiple hosts using different target groups. Is this something you are accounting for @M00nF1sh ? |
@sc-chad , |
@M00nF1sh do you have an example of this? Would love to be able to do that. |
Nevermind, figured out what you were saying. In case anyone else comes across this. You need to add:
To your service that you want to attach to the ALB. Thanks @M00nF1sh for the awesome module! |
When will this feature be documented and generally available? |
@sc-chad it will be great if you can document it here :-) |
I'll see what I can do! |
@M00nF1sh Where can we track the work you mentioned for the IngressGroups? What is general status and ETA? |
@benderillo |
@M00nF1sh this is great news. Awaiting eagerly. |
Just in case anyone didn't know - the Ingress Groups work is being discussed at #914 |
This PR makes the server support one extra command line parameter:
--force-alb-name=XXXXXX
When this is used, the server will always use this ALB all the time, no matter what.
That means it will create it if necessary and it will use the existing one otherwise. If one combines with the annotation to keep the ALB, then it will just live forever.
Also, it only cares about the rules it needs to create and to modify in the ALB.
That means one can create other rules manually and as long as they don't conflict with your kubernetes annotations, they will be untouched.
Currently it has two known issues:
I do plan to address the above issue in the future, but I am pretty sure even with them this is a step forward.
One can try it using the following docker image:
docker.io/marcosdiez/aws-alb-ingress-controller:v1.1.0-single-alb
Fixes #724 and #688 and #298 and #228
Extra explanation on how to use it:
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/aws-alb-ingress-controller/v1.1.0/docs/examples/rbac-role.yaml
Download
https://raw.githubusercontent.com/kubernetes-sigs/aws-alb-ingress-controller/v1.1.0/docs/examples/alb-ingress-controller.yaml
change the image to
image: docker.io/marcosdiez/aws-alb-ingress-controller:v1.1.0-single-alb
on the
args
section, add a new line with the load balancer name. something like- --force-alb-name=k8s-alb
follow the rest of the instructions here: https://kubernetes-sigs.github.io/aws-alb-ingress-controller/guide/walkthrough/echoserver/