1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-07 00:17:13 +00:00
kyverno/test/policy/validate/check_image_version.yaml
shivkumar dudhani 4e5f551fa7 clean up
2019-10-14 14:10:34 -07:00

22 lines
567 B
YAML

apiVersion : kyverno.io/v1alpha1
kind: ClusterPolicy
metadata:
name: image-pull-policy
spec:
rules:
- name: image-pull-policy
match:
resources:
kinds:
- Deployment
validate:
message: "Image tag ':latest' requires imagePullPolicy 'Always'"
pattern:
spec:
template:
spec:
containers:
# select images which end with :latest
- (image): "*latest"
# require that the imagePullPolicy is "Always"
imagePullPolicy: Always