Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
skipper
An HTTP router and reverse proxy for service composition, including use cases like Kubernetes Ingress
Note how I am just using the upstream AdmissionReview type from k8s.io/api/admission/v1 here. You can find other Kubernetes types in the k8s.io/api repo as well.
I learnt this the hard way. If the Kind and APIVersion aren't specified for v1 resources i.e v1.AdmissionReview, the Admission requests will just fail.
You can find an abridged version of admission.Handler under "Reference". For a complete example of a validating admission webhook being used in production, checkout the validating admission webhook in Skipper, our HTTP reverse proxy.