mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-09 01:16:55 +00:00
23 lines
510 B
YAML
23 lines
510 B
YAML
|
apiVersion : kyverno.io/v1alpha1
|
||
|
kind: Policy
|
||
|
metadata:
|
||
|
name: check-registries
|
||
|
spec:
|
||
|
rules:
|
||
|
- name: check-registries
|
||
|
resource:
|
||
|
kinds:
|
||
|
- Deployment
|
||
|
- StatefulSet
|
||
|
validate:
|
||
|
message: "Registry is not allowed"
|
||
|
pattern:
|
||
|
spec:
|
||
|
template:
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: "*"
|
||
|
# Check allowed registries
|
||
|
image: "*nirmata*"
|
||
|
# image: "*nirmata* | https://private.registry.io/*"
|