cloud-on-k8s icon indicating copy to clipboard operation
cloud-on-k8s copied to clipboard

Refactor validating webhooks to use CustomValidator

Open pebrc opened this issue 9 months ago • 0 comments

          Maybe create an issue for this?

Originally posted by @thbkrkr in https://github.com/elastic/cloud-on-k8s/pull/8400#discussion_r1932318913

We made some compromises to merge #8400. The goal of the refactoring would be to align ourselves again with controller-runtimes recommended implementation and even be able to use the controller-runtime provided handler.

One problem we would have to solve is to implement the namespace restriction our handler currently provides which ignores admission requests that are not for one of the managed namespaces. One possible idea would be to wrap the controller-runtime handler with a kind of middleware that does just that while allowing us to keep using the official implementation.

pebrc avatar Jan 28 '25 18:01 pebrc