Skip to content

Commit cd233d8

Browse files
author
dslife2023
committed
fix(registry): 更新 lvscare 镜像地址并简化配置流程
- 更新 LvsCareRepoAndTag 常量,使用完整的镜像地址 - 移除 path 包的冗余导入和使用 - 简化 lvsImageURL 的构建过程 - 统一配置流程,减少不必要的复杂性
1 parent 40830df commit cd233d8

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

Diff for: common/common.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const (
4646
KubeLvsCareStaticPodName = "kube-lvscare"
4747
RegLvsCareStaticPodName = "reg-lvscare"
4848
StaticPodDir = "/etc/kubernetes/manifests"
49-
LvsCareRepoAndTag = "/global/lvscare:latest"
49+
LvsCareRepoAndTag = "docker-cdv5ju.swr-pro.myhuaweicloud.com/global/lvscare:latest"
5050
)
5151

5252
// Envs

Diff for: pkg/registry/local.go

+3-5
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"fmt"
2222
"net"
2323
"os"
24-
"path"
2524
"path/filepath"
2625
"sort"
2726
"strconv"
@@ -181,8 +180,7 @@ func (c *localConfigurator) configureLvs(registryHosts, clientHosts []net.IP) er
181180
}
182181

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

187185
vip := GetRegistryVIP(c.infraDriver)
188186

@@ -394,7 +392,7 @@ func (c *localConfigurator) configureContainerdDaemonService(endpoint, hostTomlF
394392
var (
395393
// caFile = c.Domain + ".crt"
396394
// registryCaCertPath = filepath.Join(c.containerRuntimeInfo.CertsDir, endpoint, caFile)
397-
url = "http://" + endpoint
395+
url = "http://" + endpoint
398396
)
399397

400398
cfg := Hosts{
@@ -426,7 +424,7 @@ type HostFileConfig struct {
426424
// - string - Single file with certificate(s)
427425
// - []string - Multiple files with certificates
428426
// CACert interface{} `toml:"ca"`
429-
SkipServerVerify bool `toml:"skip_verify"`
427+
SkipServerVerify bool `toml:"skip_verify"`
430428
}
431429

432430
type DaemonConfig struct {

Diff for: pkg/runtime/kubernetes/utils.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818
"context"
1919
"fmt"
2020
"net"
21-
"path"
2221
"sort"
2322
"strconv"
2423
"strings"
@@ -187,7 +186,7 @@ func GetClientFromConfig(adminConfPath string) (runtimeClient.Client, error) {
187186
}
188187

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

192191
var rs []string
193192
var realEndpoints []string

0 commit comments

Comments
 (0)