1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00
kyverno/examples/mutate/overlay/policy_imagePullPolicy.yaml
2019-07-25 14:57:44 -04:00

20 lines
No EOL
468 B
YAML

apiVersion: kyverno.io/v1alpha1
kind: Policy
metadata:
name: set-image-pull-policy
spec:
rules:
- name: set-image-pull-policy
match:
resources:
kinds:
- Deployment
mutate:
overlay:
spec:
template:
spec:
containers:
# if the image tag is latest, set the imagePullPolicy to Always
- (image): "*:latest"
imagePullPolicy: "IfNotPresent"