JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.
Python
fix(deploy): 清理 gateway 死配置 LLM_SSL_VERIFY,product 模式放开 agentserver 节点固定
jiangchenglin381512d97538
diff --git a/deploy/enterprise/configmap_secret_handler.sh b/deploy/enterprise/configmap_secret_handler.shindex c65ad90326..86c76ed56a 100755--- a/deploy/enterprise/configmap_secret_handler.sh+++ b/deploy/enterprise/configmap_secret_handler.sh@@ -20,7 +20,6 @@ render_secret_configmap() {"RUNTIME_DB_PASSWORD""REDIS_PASSWORD""OBS_SECRET_KEY"- "API_KEY")for key in "${secret_keys[@]}"; do# 空值直接跳过,无需编码diff --git a/deploy/enterprise/patch_handler.sh b/deploy/enterprise/patch_handler.shindex 124d7e4911..43651515b0 100755--- a/deploy/enterprise/patch_handler.sh+++ b/deploy/enterprise/patch_handler.sh@@ -71,7 +71,7 @@ post_and_validate() {# 与 check_runtime_up_dependency 预创建的内置 NFS 数据目录同名)# 用法: inject_data_volume <json_file>inject_data_volume() {- local json_file="$1"+ local json_file="${CONFIG["AS_JSON_FILE"]}"local mount_type="${DEPLOY_VARS["CLAW_MOUNT_TYPE"]}"local data_volumeif [ "${mount_type}" == "pvc" ]; then@@ -94,6 +94,18 @@ inject_data_volume() {"${json_file}" > "${json_file}.tmp" && mv -f "${json_file}.tmp" "${json_file}"}+# product 模式下镜像内置代码、Pod 无需固定调度到当前节点,+# 删除 pod template 里的 nodeName 字段让 K8s 调度器自由调度+# (dev 模式靠 nodeName 固定到当前节点以便 hostPath 挂源码)。+# 用法: drop_nodename_field <json_file>+drop_nodename_field() {+ local json_file="${CONFIG["AS_JSON_FILE"]}"+ if [[ "${DEPLOY_VARS["MODE"]}" == "product" ]]; then+ jq 'del(.rawdata.templates[].nodeName)' "${json_file}" > "${json_file}.tmp"+ mv -f "${json_file}.tmp" "${json_file}"+ fi+}+# 剔除无效/不需要的 hostPath 卷(+ 引用它们的 volumeMounts):# 规则1(两模式通用):三个代码目录变量(CLAW_CODE_PATH/RUNTIME_CODE_PATH/CORE_CODE_PATH)任一为空,# 引用该变量的 hostPath 路径会变坏、不能挂载,一并剔除。映射(按 hostPath path 引用):@@ -105,7 +117,7 @@ inject_data_volume() {# hp-cgroup(sidecar 系统路径)始终保留。# 用法: drop_hostpath_volumes <json_file>drop_hostpath_volumes() {- local json_file="$1"+ local json_file="${CONFIG["AS_JSON_FILE"]}"local drop_names=()if [[ -z "${DEPLOY_VARS["CLAW_CODE_PATH"]:-}" ]]; thendrop_names+=(hp-code)@@ -144,8 +156,9 @@ render_patch_file() {error "AgentServer JSON rendering failed, invalid JSON format: ${json_file}"fi- inject_data_volume "${json_file}"- drop_hostpath_volumes "${json_file}"+ inject_data_volume+ drop_hostpath_volumes+ drop_nodename_fieldsuccess "AgentServer configuration rendered"}diff --git a/deploy/enterprise/templates/configmap-secret.template.yaml b/deploy/enterprise/templates/configmap-secret.template.yamlindex 6e0e635613..2757a49304 100644--- a/deploy/enterprise/templates/configmap-secret.template.yaml+++ b/deploy/enterprise/templates/configmap-secret.template.yaml@@ -12,4 +12,3 @@ data:OPENJIUWEN_SERVICE_DB_PASSWORD: "<<RUNTIME_DB_PASSWORD_ENCODED>>"REDIS_PASSWORD: "<<REDIS_PASSWORD_ENCODED>>"OBS_SECRET_KEY: "<<OBS_SECRET_KEY_ENCODED>>"- API_KEY: "<<API_KEY_ENCODED>>"diff --git a/deploy/enterprise/templates/gateway.template.env b/deploy/enterprise/templates/gateway.template.envindex a72b430b61..c85e378f47 100644--- a/deploy/enterprise/templates/gateway.template.env+++ b/deploy/enterprise/templates/gateway.template.env@@ -25,12 +25,6 @@ AGENT_EXTRA_TOOLS=<<AGENT_EXTRA_TOOLS>># K8s hostPath Configuration (for mounting host code directory)MODE=<<MODE>>-# Model Configuration-MODEL_PROVIDER=<<MODEL_PROVIDER>>-MODEL_NAME=<<MODEL_NAME>>-API_BASE=<<API_BASE>>-LLM_SSL_VERIFY=False-# Gateway ConfigurationLOG_MASK_ENABLED=<<LOG_MASK_ENABLED>>LOG_TO_FILE_ENABLED=<<LOG_TO_FILE_ENABLED>>