kubeadm: don't check if image exists before pulling

Removed image existence as kubeadm may miss
image tags if they're updated.
This commit is contained in:
Ed Bartosh 2019-11-25 13:00:50 +02:00
parent 9905a33fd7
commit f6f3738a00

View File

@ -833,14 +833,6 @@ func (ImagePullCheck) Name() string {
// Check pulls images required by kubeadm. This is a mutating check
func (ipc ImagePullCheck) Check() (warnings, errorList []error) {
for _, image := range ipc.imageList {
ret, err := ipc.runtime.ImageExists(image)
if ret && err == nil {
klog.V(1).Infof("image exists: %s", image)
continue
}
if err != nil {
errorList = append(errorList, errors.Wrapf(err, "failed to check if image %s exists", image))
}
klog.V(1).Infof("pulling %s", image)
if err := ipc.runtime.PullImage(image); err != nil {
errorList = append(errorList, errors.Wrapf(err, "failed to pull image %s", image))