A presentation at Container Days Conference in in Hamburg, Germany 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 intricate and finely-tuned access controls beyond the capabilities of RBAC and MutatingWebhookConfiguration provides advanced defaulting logic for all resource types. However, this capability 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 stops now!
Enter CEL-based, in-process Admission Policies!
In this talk we’ll take a look at what makes ValidatingAdmissionPolicies and MutatingAdmissionPolicies a safer choice for your admission logic, we will dive into the features and limitations and will also draw comparisons with their webhook-based alternatives, highlighting the problems they solve. Finally, we’ll walkthrough how you can begin leveraging them today and take a look at what might be coming in the future.
The following resources were mentioned during the presentation or are useful additional information.
Proposal for CEL based admission control (ValidatingAdmissionPolicy)
An open standard for policy engine reporting.
A fantastic tutorial covering built-in admission controllers, webhooks and policies.
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.