Skip to content

Commit

Permalink
Merge pull request #2207 from pixiake/master
Browse files Browse the repository at this point in the history
update kube-vip version to v0.7.2
  • Loading branch information
ks-ci-bot committed Apr 12, 2024
2 parents b872915 + 9261f90 commit b97564d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
4 changes: 4 additions & 0 deletions cmd/kk/pkg/binaries/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ func KubernetesComponentBinariesDownload(manifest *common.ArtifactManifest, path
containerManagerVersion[c.Type+c.Version] = struct{}{}
containerManager := files.NewKubeBinary(c.Type, arch, c.Version, path, manifest.Arg.DownloadCommand)
binaries = append(binaries, containerManager)
if c.Type == "docker" {
criDockerd := files.NewKubeBinary("cri-dockerd", arch, kubekeyapiv1alpha2.DefaultCriDockerdVersion, path, manifest.Arg.DownloadCommand)
binaries = append(binaries, criDockerd)
}
if c.Type == "containerd" {
runc := files.NewKubeBinary("runc", arch, kubekeyapiv1alpha2.DefaultRuncVersion, path, manifest.Arg.DownloadCommand)
binaries = append(binaries, runc)
Expand Down
19 changes: 15 additions & 4 deletions cmd/kk/pkg/images/tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"path/filepath"
"reflect"
"strings"
"time"

manifestregistry "github.com/estesp/manifest-tool/v2/pkg/registry"
manifesttypes "github.com/estesp/manifest-tool/v2/pkg/types"
Expand Down Expand Up @@ -138,7 +139,7 @@ func GetImage(runtime connector.ModuleRuntime, kubeConf *common.KubeConf, name s
"linux-utils": {RepoAddr: kubeConf.Cluster.Registry.PrivateRegistry, Namespace: "openebs", Repo: "linux-utils", Tag: "3.3.0", Group: kubekeyv1alpha2.Worker, Enable: false},
// load balancer
"haproxy": {RepoAddr: kubeConf.Cluster.Registry.PrivateRegistry, Namespace: "library", Repo: "haproxy", Tag: "2.9.6-alpine", Group: kubekeyv1alpha2.Worker, Enable: kubeConf.Cluster.ControlPlaneEndpoint.IsInternalLBEnabled()},
"kubevip": {RepoAddr: kubeConf.Cluster.Registry.PrivateRegistry, Namespace: "plndr", Repo: "kube-vip", Tag: "v0.5.0", Group: kubekeyv1alpha2.Master, Enable: kubeConf.Cluster.ControlPlaneEndpoint.IsInternalLBEnabledVip()},
"kubevip": {RepoAddr: kubeConf.Cluster.Registry.PrivateRegistry, Namespace: "plndr", Repo: "kube-vip", Tag: "v0.7.2", Group: kubekeyv1alpha2.Master, Enable: kubeConf.Cluster.ControlPlaneEndpoint.IsInternalLBEnabledVip()},
// kata-deploy
"kata-deploy": {RepoAddr: kubeConf.Cluster.Registry.PrivateRegistry, Namespace: kubekeyv1alpha2.DefaultKubeImageNamespace, Repo: "kata-deploy", Tag: "stable", Group: kubekeyv1alpha2.Worker, Enable: kubeConf.Cluster.Kubernetes.EnableKataDeploy()},
// node-feature-discovery
Expand Down Expand Up @@ -211,8 +212,18 @@ func (s *SaveImages) Execute(runtime connector.Runtime) error {
},
}

if err := o.Copy(); err != nil {
return err
// Copy image
// retry 3 times
for i := 0; i < 3; i++ {
if err := o.Copy(); err != nil {
if i == 2 {
return errors.Wrapf(err, "copy image %s failed", srcName)
}
logger.Log.Warnf("copy image %s failed, retrying", srcName)
time.Sleep(5 * time.Second)
continue
}
break
}
}
}
Expand Down Expand Up @@ -366,7 +377,7 @@ func (p *PushManifest) Execute(_ connector.Runtime) error {
logger.Log.Infof("Push multi-arch manifest list: %s", imageName)
// todo: the function can't support specify a certs dir
digest, length, err := manifestregistry.PushManifestList(auth.Username, auth.Password, manifestSpec,
false, true, auth.PlainHTTP, "")
true, true, auth.PlainHTTP, "")
if err != nil {
return errors.Wrap(errors.WithStack(err), fmt.Sprintf("push image %s multi-arch manifest failed", imageName))
}
Expand Down
4 changes: 4 additions & 0 deletions cmd/kk/pkg/version/kubernetes/version_enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const (
V126
V127
V128
V129
)

var VersionList = []Version{
Expand All @@ -51,6 +52,7 @@ var VersionList = []Version{
V126,
V127,
V128,
V129,
}

func (v Version) String() string {
Expand All @@ -75,6 +77,8 @@ func (v Version) String() string {
return "v1.27"
case V128:
return "v1.28"
case V129:
return "v1.29"
default:
return "invalid option"
}
Expand Down

0 comments on commit b97564d

Please sign in to comment.