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

27 lines
543 B
YAML
Raw Normal View History

---
apiVersion: kyverno.io/v1
kind: ClusterPolicy
2019-07-17 13:31:00 -07:00
metadata:
name: check-registries
spec:
admission: true
background: true
2019-07-17 13:31:00 -07:00
rules:
- match:
any:
- resources:
kinds:
- Deployment
- StatefulSet
name: check-registries
2019-07-17 13:31:00 -07:00
validate:
message: Registry is not allowed
2019-07-17 13:31:00 -07:00
pattern:
spec:
template:
spec:
containers:
- image: '*/nirmata/* | https://private.registry.io/*'
name: '*'
validationFailureAction: Audit