Skip to content

Commit

Permalink
fix(common): 更新 LvsCare 镜像路径并优化配置
Browse files Browse the repository at this point in the history
- 将 LvsCareRepoAndTag 从完整路径修改为相对路径 "/lvscare:latest"
- 在 localConfigurator 和 Runtime 中配置 Lvs 时,使用 EnvExternalRegistryDomain 组合完整路径
- 优化 HostFileConfig 结构体格式
  • Loading branch information
dslife2023 committed Dec 24, 2024
1 parent d167011 commit ac494ba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 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 = "docker-cdv5ju.swr-pro.myhuaweicloud.com/global/lvscare:latest"
LvsCareRepoAndTag = "/lvscare:latest"
)

// Envs
Expand Down
6 changes: 3 additions & 3 deletions pkg/registry/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func (c *localConfigurator) configureLvs(registryHosts, clientHosts []net.IP) er
}

//todo should make lvs image name as const value in sealer repo.
lvsImageURL := path.Join(common.LvsCareRepoAndTag)
lvsImageURL := path.Join(common.EnvExternalRegistryDomain, common.LvsCareRepoAndTag)

vip := GetRegistryVIP(c.infraDriver)

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

type DaemonConfig struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/runtime/kubernetes/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func GetClientFromConfig(adminConfPath string) (runtimeClient.Client, error) {
}

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

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

0 comments on commit ac494ba

Please sign in to comment.