From d8e6582b74e0ce0d9d78c65280944b24ed2a5d71 Mon Sep 17 00:00:00 2001 From: Orel Misan Date: Sun, 17 Dec 2023 09:47:28 +0200 Subject: [PATCH] VMI spec: Always pull container disk image Currently, the ImagePullPolicy on the container disk image is undefined, thus defaults to `IfNotPresent` [1]. Since we are using a single tag to represent the current state of the `main` branch, the image is not pulled again when there are updates to the VM under test's container disk image. Set the ImagePullPolicy to `Always`[2]. [1] https://kubernetes.io/docs/concepts/containers/images/#imagepullpolicy-defaulting [2] https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy Signed-off-by: Orel Misan --- pkg/internal/checkup/vmi/vmi.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/internal/checkup/vmi/vmi.go b/pkg/internal/checkup/vmi/vmi.go index dacc35c4..f794807d 100644 --- a/pkg/internal/checkup/vmi/vmi.go +++ b/pkg/internal/checkup/vmi/vmi.go @@ -195,7 +195,8 @@ func WithContainerDisk(volumeName, imageName string) Option { Name: volumeName, VolumeSource: kvcorev1.VolumeSource{ ContainerDisk: &kvcorev1.ContainerDiskSource{ - Image: imageName, + Image: imageName, + ImagePullPolicy: corev1.PullAlways, }, }, }