Skip to content

Commit

Permalink
Merge pull request kubesphere#676 from 24sama/bug-fix
Browse files Browse the repository at this point in the history
fix: if the node is exist in cluster that will not pull images
  • Loading branch information
ks-ci-bot authored Sep 15, 2021
2 parents 186a632 + dc2cee6 commit 6728143
Showing 1 changed file with 23 additions and 24 deletions.
47 changes: 23 additions & 24 deletions pkg/kubernetes/preinstall/prepull_images.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,30 @@ import (

// PullImages defines the list of images that need to be downloaded in advance and downloads them.
func PullImages(mgr *manager.Manager, node *kubekeyapiv1alpha1.HostCfg) error {
if !manager.ExistNode(mgr, node) {
i := images.Images{}
i.Images = []images.Image{
GetImage(mgr, "etcd"),
GetImage(mgr, "pause"),
GetImage(mgr, "kube-apiserver"),
GetImage(mgr, "kube-controller-manager"),
GetImage(mgr, "kube-scheduler"),
GetImage(mgr, "kube-proxy"),
GetImage(mgr, "coredns"),
GetImage(mgr, "k8s-dns-node-cache"),
GetImage(mgr, "calico-kube-controllers"),
GetImage(mgr, "calico-cni"),
GetImage(mgr, "calico-node"),
GetImage(mgr, "calico-flexvol"),
GetImage(mgr, "cilium"),
GetImage(mgr, "operator-generic"),
GetImage(mgr, "flannel"),
GetImage(mgr, "kubeovn"),
GetImage(mgr, "haproxy"),
}
if err := i.PullImages(mgr, node); err != nil {
return err
}
i := images.Images{}
i.Images = []images.Image{
GetImage(mgr, "etcd"),
GetImage(mgr, "pause"),
GetImage(mgr, "kube-apiserver"),
GetImage(mgr, "kube-controller-manager"),
GetImage(mgr, "kube-scheduler"),
GetImage(mgr, "kube-proxy"),
GetImage(mgr, "coredns"),
GetImage(mgr, "k8s-dns-node-cache"),
GetImage(mgr, "calico-kube-controllers"),
GetImage(mgr, "calico-cni"),
GetImage(mgr, "calico-node"),
GetImage(mgr, "calico-flexvol"),
GetImage(mgr, "cilium"),
GetImage(mgr, "operator-generic"),
GetImage(mgr, "flannel"),
GetImage(mgr, "kubeovn"),
GetImage(mgr, "haproxy"),
}
if err := i.PullImages(mgr, node); err != nil {
return err
}

return nil
}

Expand Down

0 comments on commit 6728143

Please sign in to comment.