mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-15 17:51:20 +00:00
22 lines
496 B
YAML
22 lines
496 B
YAML
apiVersion : kyverno.io/v1
|
|
kind: ClusterPolicy
|
|
metadata:
|
|
name: check-registries
|
|
spec:
|
|
rules:
|
|
- name: check-registries
|
|
match:
|
|
resources:
|
|
kinds:
|
|
- Deployment
|
|
- StatefulSet
|
|
validate:
|
|
message: "Registry is not allowed"
|
|
pattern:
|
|
spec:
|
|
template:
|
|
spec:
|
|
containers:
|
|
- name: "*"
|
|
# Check allowed registries
|
|
image: "*/nirmata/* | https://private.registry.io/*"
|