From 1fa88b2d9c4888ebbab9dbe56c7714aeb23127f2 Mon Sep 17 00:00:00 2001 From: sandert-k8s Date: Thu, 15 Jan 2026 17:24:16 +0100 Subject: [PATCH] fix(vap): fix cel in vap example Signed-off-by: sandert-k8s --- content/en/docs/operating/admission-policies.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/en/docs/operating/admission-policies.md b/content/en/docs/operating/admission-policies.md index ce4f147..d913e3a 100644 --- a/content/en/docs/operating/admission-policies.md +++ b/content/en/docs/operating/admission-policies.md @@ -118,7 +118,7 @@ spec: - expression: > // deny if any toleration targets control-plane taints !has(object.spec.tolerations) || - !exists(object.spec.tolerations, t, + !object.spec.tolerations.exists(t, t.key in ['node-role.kubernetes.io/master','node-role.kubernetes.io/control-plane'] ) message: "Pods may not use tolerations which schedule on control-plane nodes." @@ -325,7 +325,7 @@ spec: value: "{{`{{ minavailable }}`}}"{{< /tab >}} {{% /tabpane %}} -#### Deployment Replicas higher than PDB +#### Deployment Replicas higher than PDB PodDisruptionBudget resources are useful to ensuring minimum availability is maintained at all times.Introducing a PDB where there are already matching Pod controllers may pose a problem if the author is unaware of the existing replica count. This policy ensures that the minAvailable value is not greater or equal to the replica count of any matching existing Deployment. If other Pod controllers should also be included in this check, additional rules may be added to the policy which match those controllers. @@ -477,7 +477,7 @@ spec: (has(object.spec.instances) && object.spec.instances >= 2) message: "Set `.spec.enablePDB` to `false` for CNPG Clusters when the number of instances is lower than 2." messageExpression: | - 'Set `.spec.enablePDB` to `false` for CNPG Clusters when the number of instances is lower than 2. Current instances: ' + + 'Set `.spec.enablePDB` to `false` for CNPG Clusters when the number of instances is lower than 2. Current instances: ' + string(has(object.spec.instances) ? object.spec.instances : 1) reason: Invalid ---