Kuadrant / kuadrant-operator

The Operator to install and manage the lifecycle of the Kuadrant components deployments.
Apache License 2.0
33 stars 31 forks source link

Support targeting listeners with DNSPolicy #515

Open maleck13 opened 5 months ago

maleck13 commented 5 months ago

What

Users may not want all listeners in a gateway to be affected by a DNSPolicy. It should be possible for a user to define a policy that only targets the listeners they want managed DNS managed for. Use case: I want to define different weighting for different listener hosts.

Options

Note each of these may get implemented and may be required.

1) There is also now a new option around the policy attachment target ref https://github.com/kubernetes-sigs/gateway-api/blob/800024e13f634545934ae10d9de82513f6f2798c/apis/v1alpha2/policy_types.go#L52 that adds a section name to the target ref https://github.com/kubernetes-sigs/gateway-api/blob/800024e13f634545934ae10d9de82513f6f2798c/geps/gep-713.md?plain=1#L1247

This would allow a DNSPolicy to target a specific listener in the gateway. This is a useful option but has a downside in that it would require a policy per listener

Note this would require us to wait until GA or use main for a while of the GWAPI as the types are not in the recent 0.8 release.

Done use the new policy types https://github.com/kubernetes-sigs/gateway-api/blob/de8675f27a35bae354027a832b1335cc167a96c2/apis/v1alpha2/policy_types.go#L156 Investigate using the new target ref sectionName understand if targets can overlap https://kubernetes.slack.com/archives/CR0H13KGA/p1695713117110159 How should status be handled

guicassolato commented 1 month ago

I would check out https://github.com/kubernetes-sigs/gateway-api/pull/3213. It proposes the introduction of a new kind ListenerSet that may be of interest here.