-
Notifications
You must be signed in to change notification settings - Fork 2.8k
docs(proposal): Gateway API annotation placement clarity proposal #5919
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: master
Are you sure you want to change the base?
docs(proposal): Gateway API annotation placement clarity proposal #5919
Conversation
Addresses kubernetes-sigs#5901 Related: kubernetes-sigs#4056 Propose comprehensive solutions for Gateway API annotation placement confusion, including both short-term documentation improvements and long-term annotation inheritance strategy. Documentation improvements are proposed separately in PR kubernetes-sigs#5918 for quick merge. Co-Authored-By: Claude <[email protected]>
|
Hi @lexfrei. 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
|
@szuecs Good question! Short answer: #5918 (documentation) is a quick fix for the immediate problem. This proposal discusses whether we want to go further. The difference: PR #5918 (documentation hotfix):
This proposal (long-term discussion):
Example use case for Solution 2: # Today: must repeat annotations on EVERY Route
kind: HTTPRoute
metadata:
annotations:
external-dns.alpha.kubernetes.io/cloudflare-proxied: "true"
external-dns.alpha.kubernetes.io/ttl: "300"
---
kind: HTTPRoute
metadata:
annotations:
external-dns.alpha.kubernetes.io/cloudflare-proxied: "true" # repeated
external-dns.alpha.kubernetes.io/ttl: "300" # repeated
# With Solution 2: set once on Gateway, apply to all Routes
kind: Gateway
metadata:
annotations:
external-dns.alpha.kubernetes.io/cloudflare-proxied: "true" # default for all
external-dns.alpha.kubernetes.io/ttl: "300" # default for all
---
kind: HTTPRoute
metadata:
annotations:
external-dns.alpha.kubernetes.io/cloudflare-proxied: "false" # override for this oneWhat I'm asking:
I'm fine with just merging #5918 and closing this proposal if you think documentation alone solves the problem. This proposal is mainly to gauge interest in the more flexible approach. |
Yes, we try to stick and be aligned as much as possible with Gateway API design.
At first glance, it looks good and makes sense to me. You'll need to include
|
Summary
Addresses #5901
Related: #4056
Proposes comprehensive solutions for Gateway API annotation placement confusion, including both short-term documentation improvements and long-term annotation inheritance strategy.
Background
Users frequently misconfigure annotations when using Gateway API sources:
cloudflare-proxiedannotation on Gateway, expecting it to apply to all Routes, but it was silently ignored (annotations must be on Route resources)targetannotation on HTTPRoute to specify different targets per Route, buttargetonly works on GatewayThis proposal addresses both use cases.
Proposed Solutions
Solution 1: Documentation Improvements (Quick Win)
Status: Already proposed in PR #5918 for quick merge.
Adds clear documentation to
annotations.mdandgateway-api.mdexplaining:target)hostname,ttl, provider-specific)Note: If Solution 2 is implemented, the documentation from PR #5918 will need updates to reflect the new inheritance behavior.
Solution 2: Annotation Inheritance and Merging (Long-term)
Implement annotation merging where:
Example:
Alternatives Considered
Recommendation
Phased approach:
Request for Feedback
This proposal seeks maintainer input on:
Related PRs: