Skip to content

Commit ae96c2e

Browse files
authored
fix(vap): fix cel in vap example (#68)
Signed-off-by: sandert-k8s <sandert98@gmail.com>
1 parent 54afc01 commit ae96c2e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

content/en/docs/operating/admission-policies.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ spec:
118118
- expression: >
119119
// deny if any toleration targets control-plane taints
120120
!has(object.spec.tolerations) ||
121-
!exists(object.spec.tolerations, t,
121+
!object.spec.tolerations.exists(t,
122122
t.key in ['node-role.kubernetes.io/master','node-role.kubernetes.io/control-plane']
123123
)
124124
message: "Pods may not use tolerations which schedule on control-plane nodes."
@@ -325,7 +325,7 @@ spec:
325325
value: "{{`{{ minavailable }}`}}"{{< /tab >}}
326326
{{% /tabpane %}}
327327

328-
#### Deployment Replicas higher than PDB
328+
#### Deployment Replicas higher than PDB
329329

330330
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.
331331

@@ -477,7 +477,7 @@ spec:
477477
(has(object.spec.instances) && object.spec.instances >= 2)
478478
message: "Set `.spec.enablePDB` to `false` for CNPG Clusters when the number of instances is lower than 2."
479479
messageExpression: |
480-
'Set `.spec.enablePDB` to `false` for CNPG Clusters when the number of instances is lower than 2. Current instances: ' +
480+
'Set `.spec.enablePDB` to `false` for CNPG Clusters when the number of instances is lower than 2. Current instances: ' +
481481
string(has(object.spec.instances) ? object.spec.instances : 1)
482482
reason: Invalid
483483
---

0 commit comments

Comments
 (0)