[agent][deploy] - image sync operator
This commit is contained in:
@@ -17,6 +17,7 @@ import (
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
image2 "wdd.io/agent-common/image"
|
||||
"wdd.io/agent-common/logger"
|
||||
"wdd.io/agent-common/utils"
|
||||
@@ -321,7 +322,15 @@ func PullCmiiFromFileJson(filePathName string) {
|
||||
// PullFromFullNameList 根据镜像名列表拉取全部的镜像
|
||||
func PullFromFullNameList(fullImageNameList []string) (errorPullImageList []string) {
|
||||
|
||||
start := time.Now()
|
||||
for _, fullImageName := range fullImageNameList {
|
||||
if strings.HasPrefix(fullImageName, "harbor.cdcyy.com.cn") {
|
||||
since := time.Since(start)
|
||||
if since < 60*time.Second {
|
||||
time.Sleep(60*time.Second - since)
|
||||
start = time.Now()
|
||||
}
|
||||
}
|
||||
log.DebugF("start to pull => [%s]", fullImageName)
|
||||
pullResult := PullFromCmiiHarbor(fullImageName)
|
||||
if pullResult == nil {
|
||||
|
||||
Reference in New Issue
Block a user