mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-09 17:37:12 +00:00
20 lines
430 B
YAML
20 lines
430 B
YAML
|
apiVersion : kyverno.io/v1alpha1
|
||
|
kind: Policy
|
||
|
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/*"
|