1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-09 01:16:55 +00:00
kyverno/test/policy/validate/check_registries.yaml

23 lines
502 B
YAML
Raw Normal View History

2019-07-17 13:31:00 -07:00
apiVersion : kyverno.io/v1alpha1
kind: ClusterPolicy
2019-07-17 13:31:00 -07:00
metadata:
name: check-registries
spec:
rules:
- name: check-registries
2019-07-25 14:57:44 -04:00
match:
resources:
kinds:
- Deployment
- StatefulSet
2019-07-17 13:31:00 -07:00
validate:
message: "Registry is not allowed"
pattern:
spec:
template:
spec:
containers:
- name: "*"
# Check allowed registries
2019-10-14 12:36:19 -07:00
image: "*/nirmata/* | https://private.registry.io/*"