-
Notifications
You must be signed in to change notification settings - Fork 519
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
Increase Gateway CRD Infrastructure Annotation Limit #2734
Comments
I don't mind this in genera,l but a lot of those example annotations ought to be replaced by first class API fields that already exist |
Appreciate the feedback. Typically, we follow the guidelines of the cloud provider and their associated documentation which is often built on a version of Kubernetes that is older than the current release and those API field may not yet be available. In general, I agree reducing the number of annotations and replacing with API fields is a good practice - however, I still think we're going to need more than Would you mind providing an example of which annotation(s) are covered by Thank you! |
backendProtocol: service.ports.appProtocol |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
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. |
@howardjohn can we please reopen this? Currently this is a blocker for moving some implementations from ingress to gateway API due to the necessity of the annotations. |
/reopen |
@howardjohn: Reopened this issue. In response to this:
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. |
I ran into this today while trying to use gateway-api with the AWS LB controller. I was able to whittle it down to 8 annotations, but had to sacrifice some niceties like It looks like the limit of 8 originates from this comment, where it's acknowledged that it may be necessary to increase the limit in the future should a use case present itself. AFAIK Kubernetes doesn't impose a strict limit on the number of annotations or labels a resource can have, though annotations appear to be limited to 256Kb. That limit could be a problem for implementers of gateway-api since they'd have to use a validating admission webhook to check the length, so limiting the number of annotations is a handy shortcut that can be managed with openapi validation (that said, I suppose you could still hit the limit with one really long annotation). I'd support doubling the limits for both annotations and labels to 16 if not higher. |
@jscaltreto what implementation are you using? |
Thanks for the tip, @dudicoco! I'm using Cilium. I'll take a closer look and see if there are any alternative workarounds. Even if workarounds exist, I still think this is something that should be possible in the gateway-api spec. At the very least, the limits should be documented. |
+1 to raising the limits
…On Sun, Feb 16, 2025 at 8:27 AM Jake Scaltreto ***@***.***> wrote:
Thanks for the tip, @dudicoco <https://github.com/dudicoco>! I'm using
Cilium. I'll take a closer look and see if there are any alternative
workarounds.
Even if workarounds exist, I still think this is something that should be
possible in the gateway-api spec. At the very least, the limits should be
documented <https://gateway-api.sigs.k8s.io/guides/infrastructure/>.
—
Reply to this email directly, view it on GitHub
<#2734 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEYGXMV64VV4SCL74OFQB32QC35VAVCNFSM6AAAAABVUXZKCCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNRRGUYTCMBUGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
[image: jscaltreto]*jscaltreto* left a comment
(kubernetes-sigs/gateway-api#2734)
<#2734 (comment)>
Thanks for the tip, @dudicoco <https://github.com/dudicoco>! I'm using
Cilium. I'll take a closer look and see if there are any alternative
workarounds.
Even if workarounds exist, I still think this is something that should be
possible in the gateway-api spec. At the very least, the limits should be
documented <https://gateway-api.sigs.k8s.io/guides/infrastructure/>.
—
Reply to this email directly, view it on GitHub
<#2734 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEYGXMV64VV4SCL74OFQB32QC35VAVCNFSM6AAAAABVUXZKCCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNRRGUYTCMBUGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
We can raise the limits, but every time we do that, we make it more likely that folks will start hitting the etcd storage limits for their objects (1Mbyte by default). When you do that, the object won't be written to etcd, or persisted to Kubernetes. This is particularly a concern for annotations, since they can contain arbitrary data, as @jscaltreto says, up to 256kb per annotation. So it will be pretty easy to hit if you use annotations extensively. On top of that, a large part of the point of Gateway API is to try to move people away from using annotations, sigh. I know, folks asking for this are users who just want their things to work, I understand the necessity, but I really wish that we didn't need it. I think I could agree that doubling to 16 is acceptable. @robscott, @shaneutt, @mlavacca, any thoughts? |
It's not like it's a silent failure - the experience is the same for a user if etcd size limit is hit or the cel limit is hit. We just artificially make it (way) lower
not all usage of labels/annotations is "break glass a missing feature" - there a variety of usage beyond that (especially with labels) for categorization, identification, etc. admittedly a lot is though |
Completely agree with this point. I understand users' point as well, but I think that keeping the amount of allowed annotations low helps us in one of the main Gateway API's objectives, i.e., moving away from "configuration through annotation". Said that, I'm fine with increasing the limit to 16. It's reasonably high, yet not too high. |
I'm seeing two comments here that mention alternative solutions. Could someone please provide a deeper summary of those alternatives here? |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
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. |
What would you like to be added:
In the
experimental
branch forGateway
CRD resources, the maximum number of annotations (properties) is set to8
.https://github.com/kubernetes-sigs/gateway-api/blob/main/config/crd/experimental/gateway.networking.k8s.io_gateways.yaml#L181
This enhancement is requesting the limit be increased in order to accommodate common Cloud use-cases. A higher number of properties (~
20
) would be ideal.Why this is needed:
Downstream resources (Cloud Load Balancers, for example) often require many annotations to be configured appropriately.
For example, in an AWS environment, the responsibility of creating the underlying Network Load Balancer (NLB) or Application Load Balancer (ALB) to fulfill the Gateway object is passed to the AWS Load Balancer Controller. This Controller uses annotations to configure the load balancer properties, such as health checks, security group associations, etc.
Here are some examples of these types of configurations we typically see in our clusters:
Application (L7) Load Balancer Annotations:
Network (L4) Load Balancer Annotations:
AWS Load Balancer Controller Annotation reference:
https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.6/guide/ingress/annotations/
https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.6/guide/service/annotations/
The text was updated successfully, but these errors were encountered: