mirror of
https://github.com/rancher/rke.git
synced 2025-09-16 06:59:25 +00:00
Add sandbox image to images to pre-pull
This commit is contained in:
@@ -1048,16 +1048,19 @@ func (c *Cluster) PrePullK8sImages(ctx context.Context) error {
|
|||||||
var errgrp errgroup.Group
|
var errgrp errgroup.Group
|
||||||
hostList := hosts.GetUniqueHostList(c.EtcdHosts, c.ControlPlaneHosts, c.WorkerHosts)
|
hostList := hosts.GetUniqueHostList(c.EtcdHosts, c.ControlPlaneHosts, c.WorkerHosts)
|
||||||
hostsQueue := util.GetObjectQueue(hostList)
|
hostsQueue := util.GetObjectQueue(hostList)
|
||||||
|
imageList := []string{c.SystemImages.Kubernetes, c.Services.Kubelet.InfraContainerImage}
|
||||||
for w := 0; w < WorkerThreads; w++ {
|
for w := 0; w < WorkerThreads; w++ {
|
||||||
errgrp.Go(func() error {
|
errgrp.Go(func() error {
|
||||||
var errList []error
|
var errList []error
|
||||||
for host := range hostsQueue {
|
for host := range hostsQueue {
|
||||||
runHost := host.(*hosts.Host)
|
runHost := host.(*hosts.Host)
|
||||||
err := docker.UseLocalOrPull(ctx, runHost.DClient, runHost.Address, c.SystemImages.Kubernetes, "pre-deploy", c.PrivateRegistriesMap)
|
for _, image := range imageList {
|
||||||
|
err := docker.UseLocalOrPull(ctx, runHost.DClient, runHost.Address, image, "pre-deploy", c.PrivateRegistriesMap)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errList = append(errList, err)
|
errList = append(errList, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return util.ErrList(errList)
|
return util.ErrList(errList)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user