Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support targeting listeners with DNSPolicy #515

Closed
maleck13 opened this issue Apr 3, 2024 · 4 comments
Closed

Support targeting listeners with DNSPolicy #515

maleck13 opened this issue Apr 3, 2024 · 4 comments
Labels
kind/enhancement New feature or request status/discussing Further information is requested

Comments

@maleck13
Copy link
Collaborator

maleck13 commented Apr 3, 2024

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
Copy link
Contributor

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

@philbrookes
Copy link
Contributor

this change should be covered by gateway api.

@philbrookes philbrookes closed this as not planned Won't fix, can't repro, duplicate, stale Oct 3, 2024
@github-project-automation github-project-automation bot moved this to Done in Kuadrant Oct 3, 2024
@guicassolato
Copy link
Contributor

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?

@maleck13 maleck13 reopened this Oct 29, 2024
@mikenairn
Copy link
Member

#961

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request status/discussing Further information is requested
Projects
Status: Done
Development

No branches or pull requests

4 participants