Skip to content

Commit

Permalink
kubeadm: don't check if image exists before pulling
Browse files Browse the repository at this point in the history
Removed image existence as kubeadm may miss
image tags if they're updated.
  • Loading branch information
bart0sh committed Nov 25, 2019
1 parent 9905a33 commit f6f3738
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions cmd/kubeadm/app/preflight/checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit f6f3738

Please sign in to comment.