mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 16:06:56 +00:00
24 lines
570 B
YAML
24 lines
570 B
YAML
apiVersion : kyverno.io/v1alpha1
|
|
kind: Policy
|
|
metadata:
|
|
name: image-pull-policy
|
|
spec:
|
|
rules:
|
|
- name: image-pull-policy
|
|
match:
|
|
resources:
|
|
kinds:
|
|
- Deployment
|
|
selector:
|
|
matchLabels:
|
|
app : nginxlatest
|
|
mutate:
|
|
overlay:
|
|
spec:
|
|
template:
|
|
spec:
|
|
containers:
|
|
# select images which end with :latest
|
|
- (image): "*latest"
|
|
# require that the imagePullPolicy is "IfNotPresent"
|
|
imagePullPolicy: IfNotPresent
|