A presentation at KCD Budapest in in Budapest, Hungary by Marcus Noble
Dynamic admission controllers have long played a pivotal role in enhancing the robustness and adaptability of clusters. For instance, ValidatingWebhookConfiguration empowers users to implement finely-tuned access controls beyond the capabilities of RBAC and MutatingWebhookConfiguration provides advanced defaulting logic for all resource. However, this often comes at a price – the ease with which they can be misconfigured, potentially leading to cluster disruption and downtime.
Historically, we’ve accepted this fragility as an inevitable trade-off for greater control over our clusters. But that ends now!
Enter CEL-based, in-process Admission Policies!
In this talk we’ll look at what makes ValidatingAdmissionPolicies and MutatingAdmissionPolicies a safer choice, we will dive into the features & limitations and draw comparisons with their webhook-based alternatives, highlighting problems they solve. Finally, we’ll walkthrough how you can leveraging them today and look at the future.
The following resources were mentioned during the presentation or are useful additional information.
Proposal for CEL based admission control (ValidatingAdmissionPolicy)
Issue tracking the promotion of ValidatingAdmissionPolicy to GA, currently targetting v1.30
The official documentation for using ValidatingAdmissionPolicy
Proposal introducing the concept of MutatingAdmissionPolicy
The work in progress PR adding the functionality for MutatingAdmissionPolicy
My talk from Rejekts in Chicago about the dangers of admission controller webhooks
The official Kubernetes documentation on CEL, including the custom functions available.
The documentation for using CEL with Kyverno policies.
The documentation for using CEL in Tekton Triggers.
The CEL Go library
An online, interactive tool for building and testing CEL expressions.