1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-07 00:17:13 +00:00
kyverno/examples/demo/1_image_pull_policy/policy.yaml

29 lines
649 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
exclude:
resources:
name: nginx-deployment1
selector :
matchLabels:
app: nginx1
namespace: "default"
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