From 35051654d58eaf4422a35f5578b82817b2d581de Mon Sep 17 00:00:00 2001 From: xcwang <1366993017@qq.com> Date: Tue, 26 Dec 2023 11:22:57 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20=20=E6=96=87=E6=A1=A3=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E8=B7=B3=E8=BD=AC=E8=B7=AF=E7=94=B1=E6=94=B9=E9=80=A0?= =?UTF-8?q?=20(closed=20#1975)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/context_processors.py | 2 +- config/default.py | 2 +- env/__init__.py | 4 ++++ support-files/kubernetes/helm/bk-nodeman/README.md | 1 + .../helm/bk-nodeman/templates/configmaps/env-configmap.yaml | 1 + support-files/kubernetes/helm/bk-nodeman/values.yaml | 2 ++ 6 files changed, 10 insertions(+), 2 deletions(-) diff --git a/common/context_processors.py b/common/context_processors.py index 6a96afbba..c2addbc98 100644 --- a/common/context_processors.py +++ b/common/context_processors.py @@ -29,7 +29,7 @@ def get_docs_center_url(): - docs_suffix = "markdown/节点管理/产品白皮书/Introduce/Overview.md" + docs_suffix: str = "markdown/NodeMan/UserGuide/Introduce/Overview.md" if settings.BK_DOCS_CENTER_HOST: docs_prefix = settings.BK_DOCS_CENTER_HOST return f"{docs_prefix}/{docs_suffix}" diff --git a/config/default.py b/config/default.py index 6159f1382..440cdfcf5 100644 --- a/config/default.py +++ b/config/default.py @@ -340,7 +340,7 @@ BK_IAM_MIGRATION_APP_NAME = "iam_migrations" BK_IAM_SKIP = False -BK_DOCS_CENTER_HOST = os.getenv("BK_DOCS_CENTER_HOST") +BK_DOCS_CENTER_HOST = env.BK_DOCS_CENTER_HOST # 导航栏技术支持地址 BKAPP_NAV_HELPER_URL = env.BKAPP_NAV_HELPER_URL # 导航栏开源社区地址 diff --git a/env/__init__.py b/env/__init__.py index be69654fb..e8f1a4bfc 100644 --- a/env/__init__.py +++ b/env/__init__.py @@ -40,6 +40,7 @@ "BKAPP_MONITOR_REPORTER_CHUNK_SIZE", "BKAPP_NAV_OPEN_SOURCE_URL", "BKAPP_NAV_HELPER_URL", + "BK_DOCS_CENTER_HOST", "BK_CC_HOST", "BK_API_URL_TMPL", "ENVIRONMENT", @@ -172,3 +173,6 @@ BKAPP_NAV_HELPER_URL = get_type_env( key="BKAPP_NAV_HELPER_URL", default="https://wpa1.qq.com/KziXGWJs?_type=wpa&qidian=true", _type=str ) +# 文档中心跳转路由 + +BK_DOCS_CENTER_HOST = get_type_env(key="BK_DOCS_CENTER_HOST", default="", _type=str) diff --git a/support-files/kubernetes/helm/bk-nodeman/README.md b/support-files/kubernetes/helm/bk-nodeman/README.md index f2bd27b06..8ddc47452 100644 --- a/support-files/kubernetes/helm/bk-nodeman/README.md +++ b/support-files/kubernetes/helm/bk-nodeman/README.md @@ -269,6 +269,7 @@ externalRabbitMQ: | `bkIamUrl` | 蓝鲸权限中心 SaaS 地址 | `http://bkiam.example.com` | | `bkIamApiUrl` | 蓝鲸权限中心后台 API 地址 | `http://bkiam-api.example.com` | | `bkRepoUrl` | 蓝鲸制品库浏览器访问域名和后台 API http://bkiam-api.example.com 域名同一个 | `http://bkrepo.example.com` | +| `bkDocsCenterHost` | 蓝鲸文档中心跳转链接 | `http://apps.example.com/bk--docs--center/` | ### GSE 证书配置 diff --git a/support-files/kubernetes/helm/bk-nodeman/templates/configmaps/env-configmap.yaml b/support-files/kubernetes/helm/bk-nodeman/templates/configmaps/env-configmap.yaml index ee506352b..0bd49b39d 100644 --- a/support-files/kubernetes/helm/bk-nodeman/templates/configmaps/env-configmap.yaml +++ b/support-files/kubernetes/helm/bk-nodeman/templates/configmaps/env-configmap.yaml @@ -123,3 +123,4 @@ data: BKAPP_NAV_HELPER_URL: "{{ .Values.config.bkAppNavHelperUrl }}" BKPAAS_BK_DOMAIN: "{{ .Values.global.bkDomain }}" BKPAAS_BK_CRYPTO_TYPE: "{{ .Values.global.bkCryptoType | default "CLASSIC" }}" + BK_DOCS_CENTER_HOST: "{{ .Values.bkDocsCenterHost }}" diff --git a/support-files/kubernetes/helm/bk-nodeman/values.yaml b/support-files/kubernetes/helm/bk-nodeman/values.yaml index da843bc28..797f572d6 100644 --- a/support-files/kubernetes/helm/bk-nodeman/values.yaml +++ b/support-files/kubernetes/helm/bk-nodeman/values.yaml @@ -261,6 +261,8 @@ bkIamApiUrl: "http://bkiam-api.example.com" ## 蓝鲸制品库浏览器访问域名和后台 API http://bkiam-api.example.com 域名同一个 bkRepoUrl: "http://bkrepo.example.com" +# 文档中心跳转链接 +bkDocsCenterHost: "" ## -------------------------------------- ## GSE 证书