mirror of
https://github.com/kyverno/kyverno.git
synced 2025-01-20 18:52:16 +00:00
6a43ec4bcf
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
25 lines
531 B
YAML
25 lines
531 B
YAML
---
|
|
apiVersion: kyverno.io/v1
|
|
kind: ClusterPolicy
|
|
metadata:
|
|
name: image-pull-policy
|
|
spec:
|
|
admission: true
|
|
background: true
|
|
rules:
|
|
- match:
|
|
any:
|
|
- resources:
|
|
kinds:
|
|
- Deployment
|
|
name: image-pull-policy
|
|
validate:
|
|
message: Image tag ':latest' requires imagePullPolicy 'Always'
|
|
pattern:
|
|
spec:
|
|
template:
|
|
spec:
|
|
containers:
|
|
- (image): '*latest'
|
|
imagePullPolicy: Always
|
|
validationFailureAction: Audit
|