kuadrant-operator icon indicating copy to clipboard operation
kuadrant-operator copied to clipboard

Support targeting listeners with DNSPolicy

Open maleck13 opened this issue 2 years ago • 1 comments

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

maleck13 avatar Apr 03 '24 06:04 maleck13

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.

guicassolato avatar Jul 31 '24 09:07 guicassolato

this change should be covered by gateway api.

philbrookes avatar Oct 03 '24 10:10 philbrookes

I believe this is the equivalent of adding a sectionName field to the targetRef of the DNSPolicy, no?

Maybe that's something we have in the scope of #807 or #818 already?

guicassolato avatar Oct 03 '24 10:10 guicassolato

https://github.com/Kuadrant/kuadrant-operator/pull/961

mikenairn avatar Nov 06 '24 16:11 mikenairn