1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-09 09:26:54 +00:00
kyverno/examples/mutate/overlay/policy_imagePullPolicy.yaml

20 lines
445 B
YAML
Raw Normal View History

2019-05-22 20:07:41 -07:00
apiVersion: kyverno.io/v1alpha1
kind: Policy
metadata:
name: set-image-pull-policy
spec:
rules:
- name: set-image-pull-policy
resource:
kinds:
- Deployment
mutate:
overlay:
spec:
template:
spec:
containers:
2019-05-23 20:42:34 -07:00
# if the image tag is latest, set the imagePullPolicy to Always
- (image): "*:latest"
2019-05-23 20:37:11 +03:00
imagePullPolicy: "Always"