mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
c52f07b615
* new samples; updates * typos * add policy to restrict LoadBalancer * correct sample numbering * fix typos
22 lines
617 B
YAML
22 lines
617 B
YAML
apiVersion : kyverno.io/v1
|
|
kind: ClusterPolicy
|
|
metadata:
|
|
name: restrict-image-registries
|
|
annotations:
|
|
policies.kyverno.io/category: Workload Management
|
|
policies.kyverno.io/description: Images from unknown registries may not be scanned and secured.
|
|
Requiring use of known registries helps reduce threat exposure.
|
|
spec:
|
|
validationFailureAction: audit
|
|
rules:
|
|
- name: validate-registries
|
|
match:
|
|
resources:
|
|
kinds:
|
|
- Pod
|
|
validate:
|
|
message: "Unknown image registry."
|
|
pattern:
|
|
spec:
|
|
containers:
|
|
- image: "k8s.gcr.io/* | gcr.io/*"
|