Skip to content

Commit

Permalink
VMI spec: Always pull container disk image
Browse files Browse the repository at this point in the history
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 <omisan@redhat.com>
  • Loading branch information
orelmisan committed Dec 17, 2023
1 parent bd5d889 commit d8e6582
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/internal/checkup/vmi/vmi.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
},
}
Expand Down

0 comments on commit d8e6582

Please sign in to comment.