1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-07 00:17:13 +00:00
kyverno/examples/validate/check_registries.yaml

22 lines
475 B
YAML
Raw Normal View History

apiVersion : kyverno.io/v1alpha1
kind: Policy
metadata:
name: check-registries
spec:
rules:
- name: check-registries
resource:
2019-05-23 20:37:11 +03:00
kinds:
- Deployment
2019-05-23 20:37:11 +03:00
- StatefulSet
validate:
2019-05-23 20:37:11 +03:00
message: "Registry is not allowed"
pattern:
2019-05-23 20:37:11 +03:00
spec:
template:
spec:
containers:
- name: "*"
2019-05-23 20:42:34 -07:00
# Check allowed registries
image: "*/nirmata/* | https://private.registry.io/*"