1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00
kyverno/examples/ResourceQuota/policy-quota.yaml

28 lines
701 B
YAML
Raw Normal View History

apiVersion : policy.nirmata.io/v1alpha1
kind : Policy
metadata :
name : policy-quota-low-test
spec :
failurePolicy: stopOnError
rules:
- resource:
kind : ResourceQuota
selector:
matchLabels:
quota: low
patch:
- path : "/spec/scopeSelector/matchExpressions/1"
op : add
value :
operator : In
scopeName: PriorityClass
values: ["low-medium"]
- path : "/spec/hard"
op : replace
value: {
"cpu": "10",
"memory": "10Gi",
"pods": "10",
"limits.memory": "12Gi",
"requests.nvidia.com/gpu": "8"
}