From c64c7837c8ca97d37201aaa9a7119048035f36af Mon Sep 17 00:00:00 2001 From: Matheus Moraes Date: Fri, 8 Sep 2023 16:42:43 -0300 Subject: [PATCH] add CEL Playground link --- .../access-authn-authz/validating-admission-policy.md | 4 ++++ .../custom-resources/custom-resource-definitions.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/content/en/docs/reference/access-authn-authz/validating-admission-policy.md b/content/en/docs/reference/access-authn-authz/validating-admission-policy.md index c624d24f3d..269300c0d5 100644 --- a/content/en/docs/reference/access-authn-authz/validating-admission-policy.md +++ b/content/en/docs/reference/access-authn-authz/validating-admission-policy.md @@ -67,6 +67,10 @@ The following is an example of a ValidatingAdmissionPolicy. to validate the request. If an expression evaluates to false, the validation check is enforced according to the `spec.failurePolicy` field. +{{< note >}} +You can quickly test CEL expressions in [CEL Playground](https://playcel.undistro.io). +{{< /note >}} + To configure a validating admission policy for use in a cluster, a binding is required. The following is an example of a ValidatingAdmissionPolicyBinding.: diff --git a/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md b/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md index f316dc7f09..acb3761263 100644 --- a/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md +++ b/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md @@ -849,6 +849,10 @@ The CronTab "my-new-cron-object" is invalid: * spec: Invalid value: map[string]interface {}{"maxReplicas":10, "minReplicas":0, "replicas":20}: failed rule: self.replicas <= self.maxReplicas ``` +{{< note >}} +You can quickly test CEL expressions in [CEL Playground](https://playcel.undistro.io). +{{< /note >}} + Validation rules are compiled when CRDs are created/updated. The request of CRDs create/update will fail if compilation of validation rules fail. Compilation process includes type checking as well.