-
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
Added support for setting Proxy protocol per target group based on ServicePort #4079
base: main
Are you sure you want to change the base?
Added support for setting Proxy protocol per target group based on ServicePort #4079
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: pthak94 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @pthak94. Thanks for your PR. I'm waiting for a kubernetes-sigs 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-sigs/prow repository. |
862e07e
to
800bb02
Compare
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.
Thank you for the contribution. Please consider my comment.
docs/guide/service/annotations.md
Outdated
@@ -23,6 +23,7 @@ | |||
| [service.beta.kubernetes.io/aws-load-balancer-internal](#lb-internal) | boolean | false | deprecated, in favor of [aws-load-balancer-scheme](#lb-scheme) | | |||
| [service.beta.kubernetes.io/aws-load-balancer-scheme](#lb-scheme) | string | internal | | | |||
| [service.beta.kubernetes.io/aws-load-balancer-proxy-protocol](#proxy-protocol-v2) | string | | Set to `"*"` to enable | | |||
| [service.beta.kubernetes.io/aws-load-balancer-proxy-protocol-per-target-group](#proxy-protocol-v2) | string | | If specified,configures proxy protocol per targrt group based on ServicePort. For example `"80, true, 443, true, 22, false"` will disable proxy protocol for port 22 only. This annotation is overriden by `"service.beta.kubernetes.io/aws-load-balancer-proxy-protocol"` | |
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.
I don't think this is the correct way to model this information. How about just using a single list 80,443
to denote that those ports should have proxy protocol enabled.
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.
hmm, that indeed makes it simpler. I'll work on your suggestions shortly. Thanks!
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.
@zac-nixon added a new commit with the updated logic. Tweaked the tests and doc as well. Pls take a look.
Issue
#3877
Description
Introduced a new annotation "service.beta.kubernetes.io/aws-load-balancer-proxy-protocol-per-target-group" with which, proxy protocol setting can be configured for each target group individually. Example usage is "80, 443", which will enable proxy protocols for the target groups associated to port 80 and 443 listeners. And disable for the rest, for example port 22.
To achieve this, when target group is created, it's service port is compared to the value of this annotation, if it's found, it's value is set to true, otherwise set to false.
"service.beta.kubernetes.io/aws-load-balancer-proxy-protocol" annotation still overrides this new annotation.
Added test cases to check if the new annotation works, and that it is still overriden by "service.beta.kubernetes.io/aws-load-balancer-proxy-protocol" annotation.
Finally, added documentation regarding this new annotation.
This version of controller is tested in my EKS testing environment.
-->
Checklist
README.md
, or thedocs
directory)BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯