8000 fix(policy): allow gateway api httproutes as authorizationpolicy target type by adleong · Pull Request #13962 · linkerd/linkerd2 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(policy): allow gateway api httproutes as authorizationpolicy target type #13962

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

Merged
merged 2 commits into from
Apr 30, 2025

Conversation

adleong
Copy link
Member
@adleong adleong commented Apr 24, 2025

AuthorizationPolicies may have HTTPRoutes as targetRefs. However, the validation admission controller webhook for AuthorizationPolicies rejects any which have a httproutes.gateway.networking.k8s.io target (as opposed to httproutes.policy.linkerd.io which are accepted).

We allow httproutes.gateway.networking.k8s.io as a target ref by removing this overly restrictive validation. This validation was, in fact, completely redundant since the target type is checked during conversion and validated that it is a supported target (including httproutes.gateway.networking.k8s.io).

Validated by running through https://linkerd.io/2-edge/tasks/configuring-per-route-policy/ and replacing the httproutes.policy.linkerd.io with httproutes.gateway.networking.io (including targetRefs).

Signed-off-by: Alex Leong <alex@buoyant.io>
@adleong adleong requested a review from a team as a code owner April 24, 2025 00:23
Signed-off-by: Alex Leong <alex@buoyant.io>
@alpeb
Copy link
Member
alpeb commented Apr 29, 2025

This validation was, in fact, completely redundant since the target type is checked during conversion and validated that it is a supported target (including httproutes.gateway.networking.k8s.io).

Can you please point where this conversion is performed?

@adleong
Copy link
Member Author
adleong commented Apr 29, 2025

Copy link
Member
@alpeb alpeb left a comment

Choose a reason for hiding this comment

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

Thanks for the clarification, looks good to me 👍

@adleong adleong merged commit cdff9e2 into main Apr 30, 2025
73 of 75 checks passed
@adleong adleong deleted the alex/inbound-gwapi branch April 30, 2025 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0