mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-09 09:26:54 +00:00
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> Co-authored-by: Jim Bugwadia <jim@nirmata.com>
19 lines
424 B
YAML
19 lines
424 B
YAML
apiVersion : kyverno.io/v1
|
|
kind: ClusterPolicy
|
|
metadata:
|
|
name: restrict-image-registries
|
|
spec:
|
|
rules:
|
|
- name: validate-registries
|
|
match:
|
|
any:
|
|
- resources:
|
|
kinds:
|
|
- Pod
|
|
validate:
|
|
failureAction: Enforce
|
|
message: "Images may only come from our internal enterprise registry."
|
|
pattern:
|
|
spec:
|
|
containers:
|
|
- image: "registry.domain.com/*"
|