-
Notifications
You must be signed in to change notification settings - Fork 632
Increase TLSRoute hostnames limit from 16 to 4096 #4332
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
base: main
Are you sure you want to change the base?
Increase TLSRoute hostnames limit from 16 to 4096 #4332
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: alexanderstephan 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 |
|
Welcome @alexanderstephan! |
|
Hi @alexanderstephan. Thanks for your PR. I'm waiting for a github.com 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. |
|
Thanks for doing the calculations @alexanderstephan, that's helpful. However, adding this would mean that there's no further headroom for adding any other constructs to TLSRoute. In other conversations, we've talked about adding ALPN matching, and a couple of other additional complexities that escape me right now, but if we use all the space available for storing hostnames, we'll have none left for expansion. On top of that, I'm not sure how this would work. Because TLSRoute is about sending all traffic that matches the I'd like to understand the use case you're aiming for here better. What sort of use cases involve serving 4000 hostnames from one backend service, presumably with a single certificate? |
|
Also, we did stop shipping a validating webhook, because CEL does everything we want, generally, and the complexity cost calculations are also generally a good indication that we're keeping the API complexity under control. |
|
Thanks for looking into this, @youngnick!
I see. So, you're suggesting we should lower the limit more, e.g., to 2048?
I think it actually possible to have 10k+ hostnames per certificate from what I have seen. However, this does not apply here for this case since we can also have multiple certificates as explained below.
So, the umbrella topic here would be "multi-tenant SaaS with custom domains".
Okay, that makes sense. I guess this can be looked into in the next step when the motivation for this change is more clear. |
What type of PR is this?
/kind feature
/kind documentation
What this PR does / why we need it:
This PR updates the TLSRoute CRD validation rationale and proposes increasing the
maxItembound for hostnames from 16 to 4096. This change is proposed only to accommodate very large orgs. In large orgs, the current limit of 16, this can lead to hundred of thousands TLSRoute objects. These objects multiply storage, watch traffic, and controller memory/CPU, which drives up API-server latency and risks OOMs and instability.In a similar PR the limit has been increased: #3205
To safely deploy the change the author employed a XValidation rule. For my case, such a rule would likely be rejected for being too complex. One idea would be to add the validation to a Validating Webhook. However, the webhook as been removed:
Do you have any ideas on how to solve this issue? I would be happy for further assistance on how to tackle this.
Rationale:
Which issue(s) this PR fixes:
No issue yet.
Does this PR introduce a user-facing change?: