mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
21 lines
527 B
YAML
21 lines
527 B
YAML
apiVersion : kyverno.io/v1alpha1
|
|
kind: Policy
|
|
metadata:
|
|
name: check-whitelist-registries
|
|
spec:
|
|
rules:
|
|
- name: check-whitelist-registries
|
|
resource:
|
|
kinds:
|
|
- Deployment
|
|
- StatefulSet
|
|
validate:
|
|
message: "Registry is not allowed"
|
|
pattern:
|
|
spec:
|
|
template:
|
|
spec:
|
|
containers:
|
|
- name: "*"
|
|
# Checks if the image path starts with "https://hub.docker.io/nirmata/*"
|
|
image: https://hub.docker.io/nirmata/*
|