1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-09 17:37:12 +00:00
kyverno/test/LimitRange/policy-limitrange.yaml

26 lines
534 B
YAML
Raw Normal View History

apiVersion : kyverno.io/v1alpha1
kind : Policy
metadata :
name : policy-limitrange
spec :
rules:
- name: "rule"
resource:
2019-06-10 16:08:35 +03:00
kinds :
- LimitRange
selector:
matchLabels:
containerSize: minimal
mutate:
patches:
2019-06-10 16:08:35 +03:00
- path : "/spec/limits/0/default/memory"
op : add
value: 384Mi
validate:
message: "The CPU value is incorrect"
pattern:
spec:
limits:
- default:
2019-06-10 16:08:35 +03:00
cpu: 10m