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

27 lines
636 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
resource:
kinds:
- Deployment
2019-07-18 00:43:56 -07:00
# - StatefulSet
# name: "my-deployment"
# selector :
# matchLabels:
# app.type: prod
# namespace: "my-namespace"
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