1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00
kyverno/examples/policy_validate_imageRegistries.yaml
2019-07-29 19:01:17 -07:00

25 lines
565 B
YAML

apiVersion : kyverno.io/v1alpha1
kind: Policy
metadata:
name: check-registries
spec:
rules:
- name: check-registries
match:
resources:
kinds:
- Deployment
- StatefulSet
selector:
matchLabels:
app: nirmata-nginx
validate:
message: "Registry is not allowed"
pattern:
spec:
template:
spec:
containers:
- name: "*"
# Check allowed registries
image: "*nirmata* | https://private.registry.io/*"