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

26 lines
565 B
YAML
Raw Normal View History

2019-07-17 13:31:00 -07:00
apiVersion : kyverno.io/v1alpha1
kind: Policy
metadata:
name: check-registries
spec:
rules:
- name: check-registries
2019-07-25 14:57:44 -04:00
match:
resources:
kinds:
- Deployment
- StatefulSet
2019-07-29 19:01:17 -07:00
selector:
matchLabels:
app: nirmata-nginx
2019-07-17 13:31:00 -07:00
validate:
message: "Registry is not allowed"
pattern:
spec:
template:
spec:
containers:
- name: "*"
# Check allowed registries
2019-07-18 00:43:56 -07:00
image: "*nirmata* | https://private.registry.io/*"