mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 16:06:56 +00:00
25 lines
572 B
YAML
25 lines
572 B
YAML
apiVersion : kyverno.io/v1alpha1
|
|
kind: ClusterPolicy
|
|
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/*"
|