1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-09 09:26:54 +00:00
kyverno/examples/best_practices/policy_validate_image_registries.yaml

20 lines
437 B
YAML
Raw Normal View History

2019-09-03 11:27:04 -07:00
apiVersion : kyverno.io/v1alpha1
2019-09-04 11:29:46 -07:00
kind: ClusterPolicy
2019-09-03 11:27:04 -07:00
metadata:
name: validate-image-registry
spec:
rules:
- name: validate-image-registry
match:
resources:
kinds:
- Pod
validate:
message: "Image registry is not allowed"
pattern:
spec:
containers:
- name: "*"
# Check allowed registries
image: "*nirmata* | https://private.registry.io/*"