Skip to content

Commit

Permalink
fix(registry): 更新 lvscare 镜像地址并简化配置流程
Browse files Browse the repository at this point in the history
- 更新 LvsCareRepoAndTag 常量,使用完整的镜像地址
- 移除 path 包的冗余导入和使用
- 简化 lvsImageURL 的构建过程
- 统一配置流程,减少不必要的复杂性
  • Loading branch information
dslife2023 committed Jan 13, 2025
1 parent 40830df commit cd233d8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const (
KubeLvsCareStaticPodName = "kube-lvscare"
RegLvsCareStaticPodName = "reg-lvscare"
StaticPodDir = "/etc/kubernetes/manifests"
LvsCareRepoAndTag = "/global/lvscare:latest"
LvsCareRepoAndTag = "docker-cdv5ju.swr-pro.myhuaweicloud.com/global/lvscare:latest"
)

// Envs
Expand Down
8 changes: 3 additions & 5 deletions pkg/registry/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"fmt"
"net"
"os"
"path"
"path/filepath"
"sort"
"strconv"
Expand Down Expand Up @@ -181,8 +180,7 @@ func (c *localConfigurator) configureLvs(registryHosts, clientHosts []net.IP) er
}

//todo should make lvs image name as const value in sealer repo.
endpoint := net.JoinHostPort(c.Domain, strconv.Itoa(c.Port))
lvsImageURL := path.Join(endpoint, common.LvsCareRepoAndTag)
lvsImageURL := common.LvsCareRepoAndTag

vip := GetRegistryVIP(c.infraDriver)

Expand Down Expand Up @@ -394,7 +392,7 @@ func (c *localConfigurator) configureContainerdDaemonService(endpoint, hostTomlF
var (
// caFile = c.Domain + ".crt"
// registryCaCertPath = filepath.Join(c.containerRuntimeInfo.CertsDir, endpoint, caFile)
url = "http://" + endpoint
url = "http://" + endpoint
)

cfg := Hosts{
Expand Down Expand Up @@ -426,7 +424,7 @@ type HostFileConfig struct {
// - string - Single file with certificate(s)
// - []string - Multiple files with certificates
// CACert interface{} `toml:"ca"`
SkipServerVerify bool `toml:"skip_verify"`
SkipServerVerify bool `toml:"skip_verify"`
}

type DaemonConfig struct {
Expand Down
3 changes: 1 addition & 2 deletions pkg/runtime/kubernetes/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"context"
"fmt"
"net"
"path"
"sort"
"strconv"
"strings"
Expand Down Expand Up @@ -187,7 +186,7 @@ func GetClientFromConfig(adminConfPath string) (runtimeClient.Client, error) {
}

func (k *Runtime) configureLvs(masterHosts, clientHosts []net.IP) error {
lvsImageURL := path.Join(common.EnvExternalRegistryDomain, common.LvsCareRepoAndTag)
lvsImageURL := common.LvsCareRepoAndTag

var rs []string
var realEndpoints []string
Expand Down

0 comments on commit cd233d8

Please sign in to comment.