From 231187c9e5ec433eef9b572e944201ea240d1585 Mon Sep 17 00:00:00 2001 From: yy Date: Thu, 27 Feb 2025 03:35:03 +0000 Subject: [PATCH 1/2] fix: sealos cloud deploy script --- deploy/cloud/etc/sealos/.env.tmpl | 2 +- deploy/cloud/scripts/init.sh | 7 +++---- scripts/cloud/install.sh | 2 -- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/deploy/cloud/etc/sealos/.env.tmpl b/deploy/cloud/etc/sealos/.env.tmpl index f4def67ab49..962ddbb18ab 100644 --- a/deploy/cloud/etc/sealos/.env.tmpl +++ b/deploy/cloud/etc/sealos/.env.tmpl @@ -1,3 +1,3 @@ cloudDomain={{ .cloudDomain }} cloudPort={{ .cloudPort }} -mongodbUri={{ .mongodbUri }} \ No newline at end of file +mongodbUri={{ .mongodbUri }} diff --git a/deploy/cloud/scripts/init.sh b/deploy/cloud/scripts/init.sh index 70f9c07e0a3..37248ec705c 100644 --- a/deploy/cloud/scripts/init.sh +++ b/deploy/cloud/scripts/init.sh @@ -17,10 +17,9 @@ jwtInternal="" jwtRegional="" jwtGlobal="" -function prepare { - # source .env - source etc/sealos/.env +source etc/sealos/.env +function prepare { # kubectl apply namespace, secret and mongodb kubectl apply -f manifests/namespace.yaml @@ -292,7 +291,7 @@ function sealos_run_frontend { --env transferEnabled="true" \ --env rechargeEnabled="false" \ --env jwtInternal="$jwtInternal" - + echo "run template frontend" sealos run tars/frontend-template.tar \ --env cloudDomain=$cloudDomain \ diff --git a/scripts/cloud/install.sh b/scripts/cloud/install.sh index 21cad5b6069..be2e8eba7d3 100644 --- a/scripts/cloud/install.sh +++ b/scripts/cloud/install.sh @@ -436,8 +436,6 @@ spec: controller: autoscaling: enabled: true - nodeSelector: - node-role.kubernetes.io/control-plane: "true" tolerations: - effect: "NoExecute" operator: "Exists" From b6fa3c23c8c92849f37c8203f01914be75f36259 Mon Sep 17 00:00:00 2001 From: yy Date: Thu, 27 Feb 2025 03:55:03 +0000 Subject: [PATCH 2/2] fix: sealos cloud deploy script --- scripts/cloud/install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/cloud/install.sh b/scripts/cloud/install.sh index be2e8eba7d3..20a468a2aef 100644 --- a/scripts/cloud/install.sh +++ b/scripts/cloud/install.sh @@ -436,6 +436,13 @@ spec: controller: autoscaling: enabled: true + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerm: + matchExpressions: + - key: node-role.kubernetes.io/control-plane + operator: Exists tolerations: - effect: "NoExecute" operator: "Exists"