Description
What would you like to be added?
Currently, CEL expressions are validated only at runtime when a resource is submitted to the cluster. To address this, we propose expanding the existing kubectl-validate repository to provide a shift-left validation tool that allows users to test CEL expressions against incoming object files locally before deploying them.
https://docs.google.com/document/d/1QzEXIEdAjbPtaFnAtuHzot16Lp2X4vTpQ1AokfPFv1w/edit?tab=t.0
Why is this needed?
Kubernetes has increasingly leveraged Common Expression Language (CEL) to enhance policy enforcement and resource allocation. Features such as ValidatingAdmissionPolicy and Dynamic Resource Allocation rely on CEL to define the matching resources and how resources should be validated. However, one major challenge is the lack of a shift-left validation tool that enables developers and operators to test CEL expressions against real objects before deploying them to a cluster.