Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
yxxchange committed Jul 28, 2023
1 parent a900ae0 commit e8ae68a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Expand Up @@ -24,6 +24,7 @@ on:
- "service/**"
- "webhooks/**"
- "frontend/**"
- "deploy/cloud/manifests/free-license.yaml"
pull_request:
branches: [ "*" ]
paths-ignore:
Expand Down
27 changes: 19 additions & 8 deletions deploy/cloud/scripts/init.sh
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -141,6 +149,9 @@ function install {
# sealos run controllers
sealos_run_controller

# sealos authorize
sealos_authorize

# sealos run frontends
sealos_run_frontend
}
Expand Down

0 comments on commit e8ae68a

Please sign in to comment.