1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00
kyverno/examples/policy_mutate_imagePullPolicy.yaml

29 lines
635 B
YAML
Raw Normal View History

2019-07-17 13:31:00 -07:00
apiVersion : kyverno.io/v1alpha1
kind: Policy
metadata:
name: image-pull-policy
spec:
rules:
- name: image-pull-policy
2019-07-25 14:57:44 -04:00
match:
resources:
kinds:
- Deployment
2019-07-29 19:01:17 -07:00
selector:
matchLabels:
app : nginxlatest
exclude:
resources:
kinds:
- DaemonSet
2019-07-17 13:31:00 -07:00
mutate:
overlay:
spec:
template:
spec:
containers:
# select images which end with :latest
- (image): "*latest"
# require that the imagePullPolicy is "IfNotPresent"
imagePullPolicy: IfNotPresent