Skip to content

Commit

Permalink
fix: windows安装agent出现ieod脚本同时curl和执行 (closed TencentBlueKing#2409)
Browse files Browse the repository at this point in the history
  • Loading branch information
v_gqpgguo committed Aug 22, 2024
1 parent f7446b4 commit 1b47813
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/core/script_manage/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

from django.utils.translation import ugettext_lazy as _

import env
from apps.node_man import constants as node_man_constants

from ...node_man.constants import DEFAULT_CLOUD
Expand All @@ -37,9 +38,10 @@

IEOD_ACTIVE_FIREWALL_POLICY_SCRIPT_INFO: base.ScriptInfo = base.ScriptInfo(
name="ieod_active_firewall_policy",
filename="ieod_active_firewall_policy.bat",
path="script_manage_tmp/ieod_active_firewall_policy.bat",
filename="",
path="",
description=_("IDC Windows 物理机安装策略开通"),
oneline=env.BKAPP_IEOD_ACTIVE_FIREWALL_POLICY_SCRIPT_INFO,
support_os_list=[node_man_constants.OsType.WINDOWS],
support_cloud_id=DEFAULT_CLOUD,
)
Expand Down
5 changes: 5 additions & 0 deletions env/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
"BKPAAS_SHARED_RES_URL",
"BKAPP_LEGACY_AUTH",
"BK_NOTICE_ENABLED",
# WINDOWS IEOD脚本内容
"BKAPP_IEOD_ACTIVE_FIREWALL_POLICY_SCRIPT_INFO",
]

# ===============================================================================
Expand All @@ -86,6 +88,9 @@
key="BKAPP_SYNC_PROC_STATUS_TASK_INTERVAL", default=20 * 60, _type=int
)
BKAPP_SCRIPT_HOOKS = get_type_env(key="BKAPP_SCRIPT_HOOKS", default="", _type=str)
BKAPP_IEOD_ACTIVE_FIREWALL_POLICY_SCRIPT_INFO = get_type_env(
key="BKAPP_IEOD_ACTIVE_FIREWALL_POLICY_SCRIPT_INFO", default="", _type=str
)

# ===============================================================================
# 日志
Expand Down
1 change: 1 addition & 0 deletions support-files/kubernetes/helm/bk-nodeman/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ externalRabbitMQ:
| `config.bkAppNavHelperUrl` | 导航栏技术支持地址 | `https://wpa1.qq.com/KziXGWJs?_type=wpa&qidian=true` |
| `config.bkAppSyncProcStatusTaskInterval` | 插件进程状态同步周期 | `20 * 60` |
| `config.bkAppScriptHooks` | Agent安装前置脚本 | `""` |
| `config.bkAppIEODActiveFirewallPolicyScriptInfo` | WINDOWS IEOD脚本内容 | `""` |

## 额外的环境变量

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,4 @@ data:
BKPAAS_SHARED_RES_URL: "{{ .Values.bkSharedResUrl }}"
BKAPP_LEGACY_AUTH: "{{ .Values.config.bkAppLegacyAuth }}"
BK_NOTICE_ENABLED: "{{ .Values.bkNotice.enabled }}"
BKAPP_IEOD_ACTIVE_FIREWALL_POLICY_SCRIPT_INFO: "{{ .Values.config.bkAppIEODActiveFirewallPolicyScriptInfo }}"
2 changes: 2 additions & 0 deletions support-files/kubernetes/helm/bk-nodeman/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,8 @@ config:
bkAppSyncProcStatusTaskInterval: 1200
## Agent安装前置脚本
bkAppScriptHooks: ""
## WINDOWS IEOD脚本内容
bkAppIEODActiveFirewallPolicyScriptInfo: ""


## --------------------------------------
Expand Down

0 comments on commit 1b47813

Please sign in to comment.