diff --git a/bcs-services/bcs-bscp/cmd/ui/service/web.go b/bcs-services/bcs-bscp/cmd/ui/service/web.go index 436d55d9e8..586af1f8b8 100644 --- a/bcs-services/bcs-bscp/cmd/ui/service/web.go +++ b/bcs-services/bcs-bscp/cmd/ui/service/web.go @@ -164,6 +164,7 @@ func (s *WebServer) subRouter() http.Handler { SiteURL: config.G.Web.RoutePrefix, APIURL: config.G.Frontend.Host.BSCPAPIURL, IAMHost: config.G.Frontend.Host.BKIAMHost, + CMDBHost: config.G.Frontend.Host.BKCMDBHost, } if shouldProxyAPI { diff --git a/bcs-services/bcs-bscp/embed.go b/bcs-services/bcs-bscp/embed.go index b92778fc6f..4f76361fdc 100644 --- a/bcs-services/bcs-bscp/embed.go +++ b/bcs-services/bcs-bscp/embed.go @@ -50,6 +50,7 @@ type IndexConfig struct { RunEnv string StaticURL string IAMHost string + CMDBHost string APIURL string SiteURL string // vue 路由前缀 ProxyAPI bool @@ -158,6 +159,7 @@ func (e *EmbedWeb) RenderIndexHandler(conf *IndexConfig) http.Handler { "RUN_ENV": conf.RunEnv, "BK_BCS_BSCP_API": conf.APIURL, "BK_IAM_HOST": conf.IAMHost, + "BK_CC_HOST": conf.CMDBHost, "BK_BSCP_CONFIG": bscpConfig, "SITE_URL": conf.SiteURL, } diff --git a/bcs-services/bcs-bscp/pkg/config/frontend.go b/bcs-services/bcs-bscp/pkg/config/frontend.go index c3307a6371..6d69e34751 100644 --- a/bcs-services/bcs-bscp/pkg/config/frontend.go +++ b/bcs-services/bcs-bscp/pkg/config/frontend.go @@ -16,6 +16,7 @@ package config // HostConf host conf type HostConf struct { BKIAMHost string `yaml:"bk_iam_host"` // 权限中心 + BKCMDBHost string `yaml:"bk_cmdb_host"` // 配置平台 BSCPAPIURL string `yaml:"bscp_api_url"` // bscp api地址 }