You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Addresses #5901
Related: #4056
Add clear documentation on annotation placement for Gateway API sources
to prevent confusion about which annotations go on Gateway vs Route resources.
Changes:
- Add Gateway API Annotation Placement section to annotations.md
- Add Annotations section with examples to gateway-api.md
- Include Cloudflare and AWS provider examples
- Document common mistakes
Per review feedback, compressed annotations.md section to minimal size:
- Removed annotation placement matrix table
- Removed YAML examples
- Kept concise 2-line summary
- Kept link to comprehensive documentation
Co-authored-by: Claude <[email protected]>
Copy file name to clipboardExpand all lines: docs/annotations/annotations.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ The following table documents which sources support which annotations:
27
27
[^1]: Unless the `--ignore-hostname-annotation` flag is specified.
28
28
[^2]: Only behaves differently than `hostname` for `Service`s of type `ClusterIP` or `LoadBalancer`.
29
29
[^3]: Also supported on `Pods` referenced from a headless `Service`'s `Endpoints`.
30
-
[^4]: The annotation must be on the `Gateway`.
30
+
[^4]: For Gateway API sources, annotation placement differs by type. See [Gateway API Annotation Placement](#gateway-api-annotation-placement) for details.
31
31
[^5]: The annotation must be on the listener's `VirtualService`.
32
32
33
33
## external-dns.alpha.kubernetes.io/access
@@ -210,3 +210,13 @@ Specifies the set identifier for DNS records generated by the resource.
210
210
211
211
A set identifier differentiates among multiple DNS record sets that have the same combination of domain and type.
212
212
Which record set or sets are returned to queries is then determined by the configured routing policy.
213
+
214
+
## Gateway API Annotation Placement
215
+
216
+
When using Gateway API sources (`gateway-httproute`, `gateway-grpcroute`, `gateway-tlsroute`, etc.), annotations
217
+
are read from different resources: **Gateway resource** reads only `target` annotation, while **Route resources**
218
+
(HTTPRoute, GRPCRoute, TLSRoute, etc.) read all other annotations (`hostname`, `ttl`, `controller`, and
219
+
provider-specific annotations like `cloudflare-*`, `aws-*`, `scw-*`).
220
+
221
+
For more details and comprehensive examples, see the
222
+
[Gateway API documentation](../sources/gateway-api.md#annotations).
0 commit comments