Skip to content

Commit 871da5a

Browse files
authored
feat: Allow overriding plugin image URLs without turning off plugin server (#258)
1 parent 9ca148b commit 871da5a

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

all-in-one/scripts/start-console.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ if [ "$O11Y" == "on" ]; then
3030
export HIGRESS_CONSOLE_DASHBOARD_DATASOURCE_LOKI_URL="http://localhost:3100"
3131
fi
3232

33-
if [ "$USE_PLUGIN_SERVER" == "on" ]; then
34-
export HIGRESS_ADMIN_WASM_PLUGIN_CUSTOM_IMAGE_URL_PATTERN="http://localhost:8002/plugins/\${name}/\${version}/plugin.wasm"
33+
if [ "$USE_PLUGIN_SERVER" == "on" -a -z "$HIGRESS_ADMIN_WASM_PLUGIN_CUSTOM_IMAGE_URL_PATTERN" ]; then
34+
HIGRESS_ADMIN_WASM_PLUGIN_CUSTOM_IMAGE_URL_PATTERN="http://localhost:8002/plugins/\${name}/\${version}/plugin.wasm"
3535
fi
36+
export HIGRESS_ADMIN_WASM_PLUGIN_CUSTOM_IMAGE_URL_PATTERN
3637

3738
HIGRESS_CONSOLE_KUBE_CONFIG="/app/kubeconfig" \
3839
HIGRESS_CONSOLE_SERVICE_HOST="higress-console.static" \

all-in-one/scripts/start-controller.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ waitForApiServer
2020
set -e
2121

2222
# Use HTTP for loading wasm plugins from plugin-server
23-
if [ "$USE_PLUGIN_SERVER" == "on" ]; then
24-
export MCP_SERVER_WASM_IMAGE_URL="http://localhost:8002/plugins/mcp-server/1.0.0/plugin.wasm"
23+
if [ "$USE_PLUGIN_SERVER" == "on" -a -z "$MCP_SERVER_WASM_IMAGE_URL" ]; then
24+
MCP_SERVER_WASM_IMAGE_URL="http://localhost:8002/plugins/mcp-server/1.0.0/plugin.wasm"
2525
fi
26+
export MCP_SERVER_WASM_IMAGE_URL
2627

2728
/usr/local/bin/higress \
2829
serve \

0 commit comments

Comments
 (0)