apiVersion : kyverno.io/v1alpha1 kind: Policy metadata: name: image-pull-policy spec: rules: - name: image-pull-policy resource: kinds: - Deployment # - StatefulSet # name: "my-deployment" # selector : # matchLabels: # app.type: prod # namespace: "my-namespace" mutate: overlay: spec: template: spec: containers: # select images which end with :latest - (image): "*latest" # require that the imagePullPolicy is "IfNotPresent" imagePullPolicy: IfNotPresent