Skip to content

Commit e9968d8

Browse files
committed
fix: update docs as per review
1 parent 4fcc726 commit e9968d8

File tree

1 file changed

+36
-42
lines changed

1 file changed

+36
-42
lines changed

docs/sources/gateway.md

+36-42
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sources create DNS entries based on their respective `gateway.networking.k8s.io`
55

66
## Filtering the Routes considered
77

8-
These sources support the `--label-filter` flag, which filters *Route resources
8+
These sources support the `--label-filter` flag, which filters \*Route resources
99
by a set of labels.
1010

1111
## Domain names
@@ -16,76 +16,76 @@ of [domain names from the *Route](#domain-names-from-route).
1616
It then iterates over each of the `status.parents` with
1717
a [matching Gateway](#matching-gateways) and at least one [matching listener](#matching-listeners).
1818
For each matching listener, if the
19-
listener has a `hostname`, it narrows the set of domain names from the *Route to the portion
19+
listener has a `hostname`, it narrows the set of domain names from the \*Route to the portion
2020
that overlaps the `hostname`. If a matching listener does not have a `hostname`, it uses
2121
the un-narrowed set of domain names.
2222

2323
### Domain names from Route
2424

25-
The set of domain names from a *Route is sourced from the following places:
25+
The set of domain names from a \*Route is sourced from the following places:
2626

27-
* If the *Route is a GRPCRoute, HTTPRoute, or TLSRoute, adds each of the`spec.hostnames`.
27+
- If the \*Route is a GRPCRoute, HTTPRoute, or TLSRoute, adds each of the`spec.hostnames`.
2828

29-
* Adds the hostnames from any `external-dns.alpha.kubernetes.io/hostname` annotation on the *Route.
30-
This behavior is suppressed if the `--ignore-hostname-annotation` flag was specified.
29+
- Adds the hostnames from any `external-dns.alpha.kubernetes.io/hostname` annotation on the \*Route.
30+
This behavior is suppressed if the `--ignore-hostname-annotation` flag was specified.
3131

32-
* If no endpoints were produced by the previous steps
33-
or the `--combine-fqdn-annotation` flag was specified, then adds hostnames
34-
generated from any`--fqdn-template` flag.
32+
- If no endpoints were produced by the previous steps
33+
or the `--combine-fqdn-annotation` flag was specified, then adds hostnames
34+
generated from any`--fqdn-template` flag.
3535

36-
* If no endpoints were produced by the previous steps, each
37-
attached Gateway listener will use its `hostname`, if present.
36+
- If no endpoints were produced by the previous steps, each
37+
attached Gateway listener will use its `hostname`, if present.
3838

3939
### Matching Gateways
4040

41-
Matching Gateways are discovered by iterating over the *Route's `status.parents`:
41+
Matching Gateways are discovered by iterating over the \*Route's `status.parents`:
4242

43-
* Ignores parents with a `parentRef.group` other than
44-
`gateway.networking.k8s.io` or a `parentRef.kind` other than `Gateway`.
43+
- Ignores parents with a `parentRef.group` other than
44+
`gateway.networking.k8s.io` or a `parentRef.kind` other than `Gateway`.
4545

46-
* If the `--gateway-namespace` flag was specified, ignores parents with a `parentRef.namespace` other
47-
than the specified value.
46+
- If the `--gateway-namespace` flag was specified, ignores parents with a `parentRef.namespace` other
47+
than the specified value.
4848

49-
* If the `--gateway-label-filter` flag was specified, ignores parents whose Gateway does not match the
50-
specified label filter.
49+
- If the `--gateway-label-filter` flag was specified, ignores parents whose Gateway does not match the
50+
specified label filter.
5151

52-
* Ignores parents whose Gateway either does not exist or has not accepted the route.
52+
- Ignores parents whose Gateway either does not exist or has not accepted the route.
5353

5454
### Matching listeners
5555

5656
Iterates over all listeners for the parent's `parentRef.sectionName`:
5757

58-
* Ignores listeners whose `protocol` field does not match the kind of the *Route per the following table:
58+
- Ignores listeners whose `protocol` field does not match the kind of the \*Route per the following table:
5959

60-
| kind | protocols |
61-
|------------|-------------|
62-
| GRPCRoute | HTTP, HTTPS |
63-
| HTTPRoute | HTTP, HTTPS |
64-
| TCPRoute | TCP |
65-
| TLSRoute | TLS |
66-
| UDPRoute | UDP |
60+
| kind | protocols |
61+
| --------- | ----------- |
62+
| GRPCRoute | HTTP, HTTPS |
63+
| HTTPRoute | HTTP, HTTPS |
64+
| TCPRoute | TCP |
65+
| TLSRoute | TLS |
66+
| UDPRoute | UDP |
6767

68-
* If the parent's `parentRef.port` port is specified, ignores listeners without a matching `port`.
68+
- If the parent's `parentRef.port` port is specified, ignores listeners without a matching `port`.
6969

70-
* Ignores listeners which specify an `allowedRoutes` which does not allow the route.
70+
- Ignores listeners which specify an `allowedRoutes` which does not allow the route.
7171

7272
## Targets
7373

74-
The targets of the DNS entries created from a *Route are sourced from the following places:
74+
The targets of the DNS entries created from a \*Route are sourced from the following places:
7575

76-
1. If a matching parent Gateway has an `external-dns.alpha.kubernetes.io/target` annotation, uses
77-
the values from that.
76+
1. If a matching parent Gateway has an `external-dns.alpha.kubernetes.io/target` annotation, uses
77+
the values from that.
7878

79-
2. Otherwise, iterates over that parent Gateway's `status.addresses`,
80-
adding each address's `value`.
79+
2. Otherwise, iterates over that parent Gateway's `status.addresses`,
80+
adding each address's `value`.
8181

82-
The targets from each parent Gateway matching the *Route are then combined and de-duplicated.
82+
The targets from each parent Gateway matching the \*Route are then combined and de-duplicated.
8383

8484
## Dualstack Routes
8585

8686
Gateway resources may be served from an external-loadbalancer which may support both IPv4 and "dualstack" (both IPv4 and IPv6) interfaces.
8787
External DNS Controller uses the `external-dns.alpha.kubernetes.io/dualstack` annotation to determine this. If this annotation is
88-
set to `true` then ExternalDNS will create two alias records (one A record
88+
set to `true` then ExternalDNS will create two records (one A record
8989
and one AAAA record) for each hostname associated with the Route resource.
9090

9191
Example:
@@ -95,17 +95,11 @@ apiVersion: gateway.networking.k8s.io/v1
9595
kind: HTTPRoute
9696
metadata:
9797
annotations:
98-
konghq.com/strip-path: "true"
9998
external-dns.alpha.kubernetes.io/dualstack: "true"
10099
name: echo
101100
spec:
102101
hostnames:
103102
- echoserver.example.org
104-
parentRefs:
105-
- group: gateway.networking.k8s.io
106-
kind: Gateway
107-
name: kong
108-
namespace: kong
109103
rules:
110104
- backendRefs:
111105
- group: ""

0 commit comments

Comments
 (0)