Skip to content

Commit 27ed874

Browse files
authored
feat: Upgrade to Higress 1.3.0 (#44)
- Remove -p/--console-password parameters since Higress Console now provides an admin initialization workflow.
1 parent 2a19563 commit 27ed874

30 files changed

Lines changed: 8 additions & 72 deletions

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,6 @@ docker compose
6969

7070
用于加密敏感配置数据的密钥。长度必须为 32 个字符。若未设置,Higress 将自动生成一个随机的密钥。若需集群部署,此项必须设置。
7171

72-
* -p, --console-password=CONSOLE-PASSWORD
73-
74-
后续用户访问 Higress Console 的密码(用户名固定为 `admin`)。若未设置,Higress 将自动生成一个随机的密码。
75-
7672
* --nacos-port=NACOS-PORT
7773

7874
内置 NACOS 服务在服务器本地监听的端口。默认值为 8848。

bin/configure.sh

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -124,17 +124,6 @@ parseArgs() {
124124
MODE="params"
125125
shift
126126
;;
127-
-p)
128-
HIGRESS_CONSOLE_PASSWORD="$2"
129-
MODE="params"
130-
shift
131-
shift
132-
;;
133-
--console-password=*)
134-
HIGRESS_CONSOLE_PASSWORD="${1#*=}"
135-
MODE="params"
136-
shift
137-
;;
138127
--s)
139128
CONFIG_STORAGE="$2"
140129
MODE="params"
@@ -234,7 +223,6 @@ resetEnv() {
234223
NACOS_USERNAME=""
235224
NACOS_PASSWORD=""
236225
NACOS_DATA_ENC_KEY=""
237-
HIGRESS_CONSOLE_PASSWORD=""
238226

239227
NACOS_HTTP_PORT=$DEFAULT_NACOS_HTTP_PORT
240228
NACOS_GRPC_PORT=$(($DEFAULT_NACOS_HTTP_PORT + 1000))
@@ -358,9 +346,7 @@ configurePortsByArgs() {
358346
}
359347

360348
configureConsoleByArgs() {
361-
if [ -z "$HIGRESS_CONSOLE_PASSWORD" ]; then
362-
HIGRESS_CONSOLE_PASSWORD=$(cat /dev/urandom | head -n 10 | md5sum | head -c32)
363-
fi
349+
:
364350
}
365351

366352
configureStorage() {
@@ -485,10 +471,8 @@ configureFileStorage() {
485471
}
486472

487473
configureConsole() {
488-
echo "==== Configure Higress Console ===="
489-
echo "Username: admin"
490-
readNonEmptySecret "Please set password: "
491-
HIGRESS_CONSOLE_PASSWORD=$input
474+
# echo "==== Configure Higress Console ===="
475+
:
492476
}
493477

494478
configurePorts() {
@@ -586,10 +570,6 @@ outputWelcomeMessage() {
586570
echo " View Logs: $ROOT/bin/logs.sh"
587571
echo " Re-configure: $ROOT/bin/configure.sh -r"
588572
echo ""
589-
echo "Note:"
590-
echo " Higress Console Username: admin"
591-
echo " Higress Console Password: ${HIGRESS_CONSOLE_PASSWORD}"
592-
echo ""
593573
echo "Happy Higressing!"
594574
}
595575

@@ -617,7 +597,6 @@ HIGRESS_CONTROLLER_TAG='${HIGRESS_CONTROLLER_TAG}'
617597
HIGRESS_PILOT_TAG='${HIGRESS_PILOT_TAG}'
618598
HIGRESS_GATEWAY_TAG='${HIGRESS_GATEWAY_TAG}'
619599
HIGRESS_CONSOLE_TAG='${HIGRESS_CONSOLE_TAG}'
620-
HIGRESS_CONSOLE_PASSWORD='${HIGRESS_CONSOLE_PASSWORD}'
621600
NACOS_HTTP_PORT='${NACOS_HTTP_PORT}'
622601
NACOS_GRPC_PORT='${NACOS_GRPC_PORT}'
623602
GATEWAY_HTTP_PORT='${GATEWAY_HTTP_PORT}'

compose/.env

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ NACOS_DATA_ENC_KEY='0123456789abcdef0123456789abcdef'
99
NACOS_SERVER_TAG='v2.2.3'
1010
HIGRESS_RUNNER_TAG='0.0.3'
1111
HIGRESS_API_SERVER_TAG='0.0.10'
12-
HIGRESS_CONTROLLER_TAG='1.2.0'
13-
HIGRESS_PILOT_TAG='1.2.0'
14-
HIGRESS_GATEWAY_TAG='1.2.0'
15-
HIGRESS_CONSOLE_TAG='1.2.0'
16-
HIGRESS_CONSOLE_PASSWORD='admin'
12+
HIGRESS_CONTROLLER_TAG='1.3.0'
13+
HIGRESS_PILOT_TAG='1.3.0'
14+
HIGRESS_GATEWAY_TAG='1.3.0'
15+
HIGRESS_CONSOLE_TAG='1.3.0'
1716
NACOS_HTTP_PORT='8848'
1817
NACOS_GRPC_PORT='9848'
1918
GATEWAY_HTTP_PORT='80'

compose/docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ services:
3636
- NACOS_USERNAME
3737
- NACOS_PASSWORD
3838
- NACOS_DATA_ENC_KEY
39-
- HIGRESS_CONSOLE_PASSWORD
4039
networks:
4140
- higress-net
4241
volumes:

compose/scripts/init.sh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -439,12 +439,6 @@ EOF
439439
initializeConsole() {
440440
echo "Initializing console configurations..."
441441

442-
LOGIN_PROMPT=""
443-
if [ -z "$HIGRESS_CONSOLE_PASSWORD" ]; then
444-
HIGRESS_CONSOLE_PASSWORD="admin"
445-
LOGIN_PROMPT="Username: admin Default Password: admin"
446-
fi
447-
448442
read -r -d '' content << EOF
449443
apiVersion: v1
450444
kind: ConfigMap
@@ -454,16 +448,12 @@ metadata:
454448
namespace: higress-system
455449
data:
456450
mode: standalone
457-
login.prompt: "$LOGIN_PROMPT"
458451
EOF
459452
publishConfig "higress-system" "configmaps" "higress-console" "$content"
460453

461454
read -r -d '' content << EOF
462455
apiVersion: v1
463456
data:
464-
adminDisplayName: QWRtaW4=
465-
adminPassword: $(echo -n "$HIGRESS_CONSOLE_PASSWORD" | base64 -w 0)
466-
adminUsername: YWRtaW4=
467457
iv: $(cat /dev/urandom | tr -dc '[:graph:]' | fold -w 16 | head -n 1 | tr -d '\n' | base64 -w 0)
468458
key: $(cat /dev/urandom | tr -dc '[:graph:]' | fold -w 32 | head -n 1 | tr -d '\n' | base64 -w 0)
469459
kind: Secret

src/get-higress.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,6 @@ outputUsage() {
9797
-k, --data-enc-key=KEY the key used to encrypt sensitive configurations
9898
MUST contain 32 characters
9999
A random key will be generated if unspecified
100-
-p, --console-password=CONSOLE-PASSWORD
101-
the password to be used to visit Higress Console
102-
default to "admin" if unspecified
103100
--nacos-port=NACOS-PORT
104101
the HTTP port used to access the built-in Nacos
105102
default to 8848 if unspecified

test/configure/cases/args-builtin-full.inc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
CONFIGURE_ARGS="--use-builtin-nacos --data-enc-key=2b9841c866544379bb88ebee3021e341 --nacos-ns=higress-test --console-password=helloworld --nacos-port=30001 --gateway-http-port=30002 --gateway-https-port=30003 --gateway-metrics-port=30004 --console-port=30005"
15+
CONFIGURE_ARGS="--use-builtin-nacos --data-enc-key=2b9841c866544379bb88ebee3021e341 --nacos-ns=higress-test --nacos-port=30001 --gateway-http-port=30002 --gateway-https-port=30003 --gateway-metrics-port=30004 --console-port=30005"
1616

1717
CONFIGURE_INPUT=""
1818

@@ -24,7 +24,6 @@ declare -A EXPECTED_ENVS=(
2424
["NACOS_NS"]='higress-test'
2525
["NACOS_USERNAME"]=''
2626
["NACOS_PASSWORD"]=''
27-
["HIGRESS_CONSOLE_PASSWORD"]='helloworld'
2827
["NACOS_DATA_ENC_KEY"]='2b9841c866544379bb88ebee3021e341'
2928
["NACOS_HTTP_PORT"]='30001'
3029
["NACOS_GRPC_PORT"]='31001'

test/configure/cases/args-builtin-with-console-password-short.inc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ declare -A EXPECTED_ENVS=(
2424
["NACOS_NS"]='higress-system'
2525
["NACOS_USERNAME"]=''
2626
["NACOS_PASSWORD"]=''
27-
["HIGRESS_CONSOLE_PASSWORD"]='helloworld'
2827
["NACOS_HTTP_PORT"]='8848'
2928
["NACOS_GRPC_PORT"]='9848'
3029
["GATEWAY_HTTP_PORT"]='80'

test/configure/cases/args-builtin-with-console-password.inc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ declare -A EXPECTED_ENVS=(
2424
["NACOS_NS"]='higress-system'
2525
["NACOS_USERNAME"]=''
2626
["NACOS_PASSWORD"]=''
27-
["HIGRESS_CONSOLE_PASSWORD"]='helloworld'
2827
["NACOS_HTTP_PORT"]='8848'
2928
["NACOS_GRPC_PORT"]='9848'
3029
["GATEWAY_HTTP_PORT"]='80'

test/configure/cases/args-external-full.inc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ declare -A EXPECTED_ENVS=(
2727
["NACOS_NS"]='higress-test'
2828
["NACOS_USERNAME"]='nacos'
2929
["NACOS_PASSWORD"]='nacos'
30-
["HIGRESS_CONSOLE_PASSWORD"]='helloworld'
3130
["NACOS_DATA_ENC_KEY"]='2b9841c866544379bb88ebee3021e341'
3231
["NACOS_HTTP_PORT"]='8848'
3332
["NACOS_GRPC_PORT"]='9848'

0 commit comments

Comments
 (0)