From e8ae68a2c8e10026104ee0daa61ae1e9c299c54d Mon Sep 17 00:00:00 2001 From: ElonMuskkkkkk Date: Fri, 28 Jul 2023 17:24:13 +0800 Subject: [PATCH] fix bugs --- .github/workflows/ci.yml | 1 + deploy/cloud/scripts/init.sh | 27 +++++++++++++++++++-------- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 32f3e69d1c1..9173cc0bd02 100755 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,7 @@ on: - "service/**" - "webhooks/**" - "frontend/**" + - "deploy/cloud/manifests/free-license.yaml" pull_request: branches: [ "*" ] paths-ignore: diff --git a/deploy/cloud/scripts/init.sh b/deploy/cloud/scripts/init.sh index 766b4d5fa14..5e58dda0ac6 100644 --- a/deploy/cloud/scripts/init.sh +++ b/deploy/cloud/scripts/init.sh @@ -56,6 +56,22 @@ function sealos_run_controller { --env enableMonitor="true" } +function sealos_authorize { + echo "start to authorize sealos" + + echo "create admin-user" + # create admin-user + kubectl apply -f manifests/admin-user.yaml + + # wait for admin-user ready + echo "waiting for admin-user generated" + sleep 3 + + # issue license for admin-user + echo "license issue for admin-user" + kubectl apply -f manifests/free-license.yaml +} + function gen_mongodbUri() { # if mongodbUri is empty then create mongodb and gen mongodb uri if [ -z "$mongodbUri" ]; then @@ -124,14 +140,6 @@ function install { # apply notifications crd kubectl apply -f manifests/notifications_crd.yaml - # apply admin user - kubectl apply -f manifests/admin-user.yaml - # ensure admin namespace and admin account created - sleep 5 - - # apply free license for admin - kubectl apply -f manifests/free-license.yaml - # create tls secret create_tls_secret $cloudDomain @@ -141,6 +149,9 @@ function install { # sealos run controllers sealos_run_controller + # sealos authorize + sealos_authorize + # sealos run frontends sealos_run_frontend }