fix kyverno boolean and resource validation
Kube-bench CIS scan / Scan ephemeral K3s cluster (push) Failing after 3m11s
Kube-bench CIS scan / Scan ephemeral K3s cluster (push) Failing after 3m11s
This commit is contained in:
@@ -27,23 +27,14 @@ spec:
|
||||
message: Every container must define CPU and memory limits.
|
||||
foreach:
|
||||
- list: request.object.spec.containers[]
|
||||
deny:
|
||||
conditions:
|
||||
any:
|
||||
- key: "{{ element.resources.limits.cpu || '' }}"
|
||||
operator: Equals
|
||||
value: ""
|
||||
- key: "{{ element.resources.limits.memory || '' }}"
|
||||
operator: Equals
|
||||
value: ""
|
||||
pattern:
|
||||
resources:
|
||||
limits:
|
||||
cpu: "?*"
|
||||
memory: "?*"
|
||||
- list: request.object.spec.initContainers[]
|
||||
deny:
|
||||
conditions:
|
||||
any:
|
||||
- key: "{{ element.resources.limits.cpu || '' }}"
|
||||
operator: Equals
|
||||
value: ""
|
||||
- key: "{{ element.resources.limits.memory || '' }}"
|
||||
operator: Equals
|
||||
value: ""
|
||||
|
||||
pattern:
|
||||
resources:
|
||||
limits:
|
||||
cpu: "?*"
|
||||
memory: "?*"
|
||||
|
||||
Reference in New Issue
Block a user