forked from higress-group/higress-standalone
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-controller.sh
More file actions
37 lines (30 loc) · 1.17 KB
/
start-controller.sh
File metadata and controls
37 lines (30 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
cd "$(dirname -- "$0")"
ROOT=$(pwd)
cd - >/dev/null
source $ROOT/base.sh
if [ -z "$GATEWAY_HTTP_PORT" ] || [[ ! "$GATEWAY_HTTP_PORT" =~ ^[0-9]+$ ]] || ((GATEWAY_HTTP_PORT < 1 || GATEWAY_HTTP_PORT > 65535)); then
GATEWAY_HTTP_PORT=8080
fi
if [ -z "$GATEWAY_HTTPS_PORT" ] || [[ ! "$GATEWAY_HTTPS_PORT" =~ ^[0-9]+$ ]] || ((GATEWAY_HTTPS_PORT < 1 || GATEWAY_HTTPS_PORT > 65535)); then
GATEWAY_HTTPS_PORT=8443
fi
echo "GATEWAY_HTTP_PORT=$GATEWAY_HTTP_PORT"
echo "GATEWAY_HTTPS_PORT=$GATEWAY_HTTPS_PORT"
waitForApiServer
set -e
# Use HTTP for loading wasm plugins from plugin-server
if [ "$USE_PLUGIN_SERVER" == "on" -a -z "$MCP_SERVER_WASM_IMAGE_URL" ]; then
MCP_SERVER_WASM_IMAGE_URL="http://localhost:8002/plugins/mcp-server/1.0.0/plugin.wasm"
fi
export MCP_SERVER_WASM_IMAGE_URL
/usr/local/bin/higress \
serve \
--kubeconfig=/app/kubeconfig \
--gatewaySelectorKey=higress \
--gatewaySelectorValue=higress-system-higress-gateway \
--gatewayHttpPort=$GATEWAY_HTTP_PORT \
--gatewayHttpsPort=$GATEWAY_HTTPS_PORT \
--ingressClass= \
--enableAutomaticHttps=${GATEWAY_AUTO_HTTPS_ENABLED:-true} \
--automaticHttpsEmail=$GATEWAY_AUTO_HTTPS_EMAIL