mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 16:06:56 +00:00
23 lines
No EOL
547 B
YAML
23 lines
No EOL
547 B
YAML
apiVersion: kyverno.io/v1
|
|
kind: ClusterPolicy
|
|
metadata:
|
|
name: check-value
|
|
spec:
|
|
validationFailureAction: Enforce
|
|
rules:
|
|
- name: check-value
|
|
match:
|
|
any:
|
|
- resources:
|
|
kinds:
|
|
- ConfigMap
|
|
validate:
|
|
message: "All data values must be in the specified range."
|
|
pattern:
|
|
data:
|
|
first_value: "+2-+4"
|
|
second_value: "-2-5"
|
|
third_value: "100Mi!-1024Mi"
|
|
fourth_value: "2.5-3.5"
|
|
fifth_value: "-10--8"
|
|
|