Skip to content

Commit

Permalink
feat: 平台信息使用远程配置 (closed TencentBlueKing#2281)
Browse files Browse the repository at this point in the history
  • Loading branch information
wyyalt committed Jul 12, 2024
1 parent fddef9a commit 2828252
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
from blueapps.account.conf import ConfFixture
from django.conf import settings
from django.utils.translation import ugettext as _
from version_log.utils import get_latest_version

from apps.core.concurrent.cache import FuncCacheDecorator
from apps.node_man import constants, models
from apps.node_man.handlers.iam import IamHandler
from apps.utils.local import get_request_username
from version_log.utils import get_latest_version

"""
context_processor for common(setting)
Expand Down Expand Up @@ -113,4 +113,5 @@ def mysetting(request):
"ENABLE_AP_VERSION_MUTEX": get_ap_version_mutex(),
# 是否开启消息中心
"ENABLE_NOTICE_CENTER": settings.ENABLE_NOTICE_CENTER,
"BKPAAS_SHARED_RES_URL": settings.BKPAAS_SHARED_RES_URL,
}
2 changes: 2 additions & 0 deletions config/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@
# Agent安装前置脚本
SCRIPT_HOOKS = env.BKAPP_SCRIPT_HOOKS

BKPAAS_SHARED_RES_URL = env.BKPAAS_SHARED_RES_URL

# 敏感参数
SENSITIVE_PARAMS = ["app_code", "app_secret", "bk_app_code", "bk_app_secret", "auth_info"]

Expand Down
2 changes: 2 additions & 0 deletions env/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"BKAPP_SYNC_PROC_STATUS_TASK_INTERVAL",
# Agent安装前置脚本
"BKAPP_SCRIPT_HOOKS",
"BKPAAS_SHARED_RES_URL",
]

# ===============================================================================
Expand Down Expand Up @@ -184,3 +185,4 @@
# 文档中心跳转路由

BK_DOCS_CENTER_HOST = get_type_env(key="BK_DOCS_CENTER_HOST", default="", _type=str)
BKPAAS_SHARED_RES_URL = get_type_env(key="BKPAAS_SHARED_RES_URL", default="", _type=str)
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,4 @@ data:
BKAPP_SYNC_PROC_STATUS_TASK_INTERVAL: "{{ .Values.config.bkAppSyncProcStatusTaskInterval }}"

BKAPP_SCRIPT_HOOKS: "{{ .Values.config.bkAppScriptHooks }}"
BKPAAS_SHARED_RES_URL: "{{ .Values.bkSharedResUrl }}"

0 comments on commit 2828252

Please sign in to comment.