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

Remove HTTPRoute listener and parentRef validation from admission webhook #5197

Closed
3 tasks
pmalek opened this issue Nov 17, 2023 · 1 comment · Fixed by #5469
Closed
3 tasks

Remove HTTPRoute listener and parentRef validation from admission webhook #5197

pmalek opened this issue Nov 17, 2023 · 1 comment · Fixed by #5469
Assignees
Labels
area/admission area/gateway-api Relating to upstream Kubernetes SIG Networking Gateway API
Milestone

Comments

@pmalek
Copy link
Member

pmalek commented Nov 17, 2023

Problem statement

KIC's admission webhook has some (legacy?) Gateway API validation code that was introduce in early days of Gateway API.

Some logic that's covered in admission webhook should be done in runtime via the respective controllers, e.g.:

There is also a separate aspect which is not allowing HTTPRoutes which do not have a matched LIstener on a referenced Gateway (which is set in route's parentRef) present in the cluster - this should be allowed and a relevant status parent condition - NoMatchingParent - should be set in HTTPRoute

Furthermore, HTTPRoutes that do not reference Gateways managed by KIC should be allowed to be created, but no status update should happen (they should be ignored by the controller).

Additional Information

The related issue about the HTTPRoute features validation: #5253

Acceptance criteria

  • HTTPRoute which doesn't have a Listener matching the specified parentRef is not rejected in the admission webhook but allowed in and appropriate status - NoMatchingParent - is set in its status.
  • HTTPRoute which doesn't match Gateway listener's AllowedRoutes is allowed by admission webhook and appropriate parent status condition - NotAllowedByListeners - is set in its status.
  • HTTPRoute which doesn't match Gateways managed by KIC should be allowed but ignored by the controller.
@pmalek pmalek added the area/gateway-api Relating to upstream Kubernetes SIG Networking Gateway API label Nov 17, 2023
@rainest
Copy link
Contributor

rainest commented Nov 27, 2023

kubernetes-sigs/gateway-api#2617 covers some parts of the spec that may need changes to add additional status types for feature compatibility.

@mlavacca mlavacca added this to the KIC v3.1.x milestone Nov 29, 2023
@mflendrich mflendrich changed the title Remove HTTPRoute listener and parentRef validation from admission webhook Remove HTTPRoute listener and parentRef validation from aXR47dmission webhook Jan 3, 2024
@mflendrich mflendrich changed the title Remove HTTPRoute listener and parentRef validation from aXR47dmission webhook Remove HTTPRoute listener and parentRef validation from admission webhook Jan 17, 2024
@czeslavo czeslavo self-assigned this Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/admission area/gateway-api Relating to upstream Kubernetes SIG Networking Gateway API
Projects
None yet
4 participants