1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-07 00:17:13 +00:00
kyverno/test/ResourceQuota/policy-quota-validation.yaml

49 lines
1 KiB
YAML
Raw Normal View History

apiVersion : kyverno.io/v1alpha1
kind : Policy
metadata :
name : policy-quota-low-test-validation
spec :
rules:
- name: "rule1"
2019-07-25 14:57:44 -04:00
match:
resources:
kinds :
- ResourceQuota
selector:
matchLabels:
quota: low
validate:
message: "This RQ requests too many RAM"
pattern:
spec:
hard:
memory: "8Gi|12Gi"
- name: "rule2"
2019-07-25 14:57:44 -04:00
match:
resources:
kinds :
- ResourceQuota
selector:
matchLabels:
quota: low
validate:
message: "This RQ requests too many CPUs"
pattern:
spec:
hard:
cpu: <3
- name: "rule3"
2019-07-25 14:57:44 -04:00
match:
resources:
kinds :
- ResourceQuota
selector:
matchLabels:
quota: low
validate:
message: "This RQ requests too many PODs"
pattern:
spec:
hard:
pods: 1|2|3|4