Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions all-in-one/scripts/start-gateway.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ else
fi

/usr/local/bin/higress-proxy-start.sh proxy router \
--concurrency=${GATEWAY_CONCURRENCY:-16} \
--domain=higress-system.svc.cluster.local \
--proxyLogLevel=${GATEWAY_LOG_LEVEL:-warning} \
--proxyComponentLogLevel=${GATEWAY_COMPONENT_LOG_LEVEL:-misc:error} \
Expand Down
2 changes: 2 additions & 0 deletions compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ services:
command:
- proxy
- router
- --concurrency
- "16"
Comment on lines +180 to +181
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

硬编码的并发值应改为环境变量引用

🟡 Major | 🧹 Code Smells

📋 问题详情

在docker-compose配置中直接使用固定数值16作为并发参数,未使用环境变量。这违背了配置参数外部化原则,导致无法通过环境变量动态调整配置。

💡 解决方案

修改为环境变量引用格式:

-      - --concurrency
-      - "16"
+      - --concurrency
+      - "${GATEWAY_CONCURRENCY:-16}"

或合并为单个参数项:

-      - --concurrency
-      - "16"
+      - --concurrency=${GATEWAY_CONCURRENCY:-16}

两种方案均可,需根据程序参数解析方式选择


您的反馈对我们很重要!(建议右键在新标签页中打开以下链接)

有用意见👍无用意见👎错误意见❌

- --domain
- higress-system.svc.cluster.local
- --proxyLogLevel=warning
Expand Down