mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-09 09:26:54 +00:00
43 lines
923 B
YAML
43 lines
923 B
YAML
|
apiVersion : kubepolicy.nirmata.io/v1alpha1
|
||
|
kind : Policy
|
||
|
metadata :
|
||
|
name : policy-quota-low-test-validation
|
||
|
spec :
|
||
|
rules:
|
||
|
- name:
|
||
|
resource:
|
||
|
kind : ResourceQuota
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
quota: low
|
||
|
validate:
|
||
|
message: "This RQ requests too many RAM"
|
||
|
pattern:
|
||
|
spec:
|
||
|
hard:
|
||
|
memory: "8Gi|12Gi"
|
||
|
- name:
|
||
|
resource:
|
||
|
kind : ResourceQuota
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
quota: low
|
||
|
validate:
|
||
|
message: "This RQ requests too many CPUs"
|
||
|
pattern:
|
||
|
spec:
|
||
|
hard:
|
||
|
cpu: <3
|
||
|
- name:
|
||
|
resource:
|
||
|
kind : ResourceQuota
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
quota: low
|
||
|
validate:
|
||
|
message: "This RQ requests too many PODs"
|
||
|
pattern:
|
||
|
spec:
|
||
|
hard:
|
||
|
pods: 1|2|3|4
|