Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions charts/external-dns/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ rules:
- apiGroups: ["gateway.networking.k8s.io"]
resources: ["gateways"]
verbs: ["get","watch","list"]
- apiGroups: ["gateway.networking.x-k8s.io"]
resources: ["xlistenersets"]
verbs: ["get","watch","list"]
{{- end }}
{{- if not .Values.namespaced }}
- apiGroups: [""]
Expand Down Expand Up @@ -158,6 +161,9 @@ rules:
- apiGroups: ["gateway.networking.k8s.io"]
resources: ["gateways"]
verbs: ["get","watch","list"]
- apiGroups: ["gateway.networking.x-k8s.io"]
resources: ["xlistenersets"]
verbs: ["get","watch","list"]
{{- end }}
{{- end }}
{{- end }}
1 change: 1 addition & 0 deletions docs/flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
| `--[no-]exclude-unschedulable` | Exclude nodes that are considered unschedulable (default: true) |
| `--[no-]expose-internal-ipv6` | When using the node source, expose internal IPv6 addresses (optional, default: false) |
| `--fqdn-template=""` | A templated string that's used to generate DNS names from sources that don't define a hostname themselves, or to add a hostname suffix when paired with the fake source (optional). Accepts comma separated list for multiple global FQDN. |
| `--[no-]gateway-enable-experimental` | Enable Gateway API experimental (gateway.networking.x-k8s.io) resources (currently only XListenerSet support for routes) |
| `--gateway-label-filter=""` | Filter Gateways of Route endpoints via label selector (default: all gateways) |
| `--gateway-name=""` | Limit Gateways of Route endpoints to a specific name (default: all names) |
| `--gateway-namespace=""` | Limit Gateways of Route endpoints to a specific namespace (default: all namespaces) |
Expand Down
2 changes: 2 additions & 0 deletions docs/sources/gateway-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ spec:
- --source=gateway-tlsroute
- --source=gateway-tcproute
- --source=gateway-udproute
# Optionally, enable Gateway API Experimental resource support (XListenerSet)
- --gateway-enable-experimental
# Optionally, limit Routes to those in the given namespace.
- --namespace=my-route-namespace
# Optionally, limit Routes to those matching the given label selector.
Expand Down
9 changes: 9 additions & 0 deletions docs/sources/gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
The gateway-grpcroute, gateway-httproute, gateway-tcproute, gateway-tlsroute, and gateway-udproute
sources create DNS entries based on their respective `gateway.networking.k8s.io` resources.

## Gateway experimental support

Optionally, [ListenerSet](https://gateway-api.sigs.k8s.io/geps/gep-1713) support can be enabled
with the flag `--gateway-enable-experimental`. In this case, the `xlistenerset.gateway.networking.x-k8s.io`
resource listener entries will be appended to the `gateway.networking.k8s.io` listeners.

## Filtering the Routes considered

These sources support the `--label-filter` flag, which filters \*Route resources
Expand Down Expand Up @@ -46,6 +52,9 @@ Matching Gateways are discovered by iterating over the \*Route's `status.parents
- If the `--gateway-name` flag was specified, ignores parents with a `parentRef.name` other than the
specified value.

- When [experimental](#gateway-experimental-support) support is enabled the Gateway is expanded from
the `parentRef` of the `XListenerSet`.

Comment on lines +55 to +57
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you please also complete the example just below accordingly?

For example, given the following HTTPRoute:

```yaml
Expand Down
3 changes: 3 additions & 0 deletions pkg/apis/externaldns/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ type Config struct {
IgnoreIngressRulesSpec bool
ListenEndpointEvents bool
ExposeInternalIPV6 bool
GatewayEnableExperimental bool
GatewayName string
GatewayNamespace string
GatewayLabelFilter string
Expand Down Expand Up @@ -288,6 +289,7 @@ var defaultConfig = &Config{
ExoscaleAPIZone: "ch-gva-2",
ExposeInternalIPV6: false,
FQDNTemplate: "",
GatewayEnableExperimental: false,
GatewayLabelFilter: "",
GatewayName: "",
GatewayNamespace: "",
Expand Down Expand Up @@ -626,6 +628,7 @@ func bindFlags(b FlagBinder, cfg *Config) {
b.BoolVar("exclude-unschedulable", "Exclude nodes that are considered unschedulable (default: true)", defaultConfig.ExcludeUnschedulable, &cfg.ExcludeUnschedulable)
b.BoolVar("expose-internal-ipv6", "When using the node source, expose internal IPv6 addresses (optional, default: false)", false, &cfg.ExposeInternalIPV6)
b.StringVar("fqdn-template", "A templated string that's used to generate DNS names from sources that don't define a hostname themselves, or to add a hostname suffix when paired with the fake source (optional). Accepts comma separated list for multiple global FQDN.", defaultConfig.FQDNTemplate, &cfg.FQDNTemplate)
b.BoolVar("gateway-enable-experimental", "Enable Gateway API experimental (gateway.networking.x-k8s.io) resources (currently only XListenerSet support for routes)", defaultConfig.GatewayEnableExperimental, &cfg.GatewayEnableExperimental)
b.StringVar("gateway-label-filter", "Filter Gateways of Route endpoints via label selector (default: all gateways)", defaultConfig.GatewayLabelFilter, &cfg.GatewayLabelFilter)
b.StringVar("gateway-name", "Limit Gateways of Route endpoints to a specific name (default: all names)", defaultConfig.GatewayName, &cfg.GatewayName)
b.StringVar("gateway-namespace", "Limit Gateways of Route endpoints to a specific namespace (default: all namespaces)", defaultConfig.GatewayNamespace, &cfg.GatewayNamespace)
Expand Down
Loading
Loading