rancher / kubewarden-ui

Kubewarden's User Interface
Apache License 2.0
11 stars 13 forks source link

Add support for Kubewarden's (Cluster)AdmissionPolicy `spec.matchConditions` #849

Closed viccuad closed 2 months ago

viccuad commented 2 months ago

Since Kubewarden 1.15, now (Cluster)AdmissionPolicies have a new field, spec.matchConditions. See https://github.com/kubewarden/kubewarden-controller/issues/758

This new field spec.matchConditions is optional, and only has effect if the Kubernetes cluster was deployed with the feature gate AdmissionWebhookMatchConditions is enabled. Knowing if that's the case isn't trivial as the K8s APIserver doesn't expose it, hence we check for the feature in kubewarden-controller:

spec.matchConditions value is a CEL expression. The Kubewarden controller takes care of validating that CEL expression syntactically, hence the UI doesn't need to.

Acceptance criteria