Skip to content

Commit

Permalink
chore: add launchpad monitor service. (#4653)
Browse files Browse the repository at this point in the history
Signed-off-by: yy <[email protected]>
  • Loading branch information
lingdie authored Apr 2, 2024
1 parent b12e933 commit 6569cc7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 2 additions & 0 deletions deploy/cloud/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ retryPullImage ghcr.io/labring/sealos-cloud-cronjob-frontend:latest

retryPullImage ghcr.io/labring/sealos-cloud-database-service:latest
retryPullImage ghcr.io/labring/sealos-cloud-account-service:latest
retryPullImage ghcr.io/labring/sealos-cloud-launchpad-service:latest
retryPullImage ghcr.io/labring/sealos-cloud-job-init-controller:latest
retryPullImage ghcr.io/labring/sealos-cloud-job-heartbeat-controller:latest

Expand All @@ -63,5 +64,6 @@ sealos save -o tars/frontend-cronjob.tar ghcr.io/labring/sealos-cloud-cronjob-fr

sealos save -o tars/database-service.tar ghcr.io/labring/sealos-cloud-database-service:latest
sealos save -o tars/account-service.tar ghcr.io/labring/sealos-cloud-account-service:latest
sealos save -o tars/launchpad-service.tar ghcr.io/labring/sealos-cloud-launchpad-service:latest
sealos save -o tars/job-init.tar ghcr.io/labring/sealos-cloud-job-init-controller:latest
sealos save -o tars/job-heartbeat.tar ghcr.io/labring/sealos-cloud-job-heartbeat-controller:latest
6 changes: 4 additions & 2 deletions deploy/cloud/scripts/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,11 @@ function sealos_run_frontend {
--env cloudPort="$cloudPort" \
--env certSecretName="wildcard-cert"


echo "run db monitoring"
echo "run database monitoring"
sealos run tars/database-service.tar

echo "run launchpad monitoring"
sealos run tars/launchpad-service.tar
}

function resource_exists {
Expand Down
8 changes: 4 additions & 4 deletions scripts/cloud/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,8 @@ EOF
get_prompt "ingress_installation"
sealos run ${image_registry}/${image_repository}/ingress-nginx:v${ingress_nginx_version#v:-1.9.4} --config-file $CLOUD_DIR/ingress-nginx-config.yaml

sealos run ${image_registry}/${image_repository}/kubeblocks:v${kubeblocks_version#v:-0.8.2} \
${image_registry}/${image_repository}/kubeblocks-apecloud-mysql:v${kubeblocks_version#v:-0.8.2} \
sealos run ${image_registry}/${image_repository}/kubeblocks:v${kubeblocks_version#v:-0.8.2}
sealos run ${image_registry}/${image_repository}/kubeblocks-apecloud-mysql:v${kubeblocks_version#v:-0.8.2} \
${image_registry}/${image_repository}/kubeblocks-postgresql:v${kubeblocks_version#v:-0.8.2} \
${image_registry}/${image_repository}/kubeblocks-mongodb:v${kubeblocks_version#v:-0.8.2} \
${image_registry}/${image_repository}/kubeblocks-redis:v${kubeblocks_version#v:-0.8.2}
Expand All @@ -652,14 +652,14 @@ EOF
get_prompt "installing_monitoring"
sealos run "${image_registry}/${image_repository}/victoria-metrics-k8s-stack:v${victoria_metrics_k8s_stack_version#v:-1.96.0}"

kubectl patch cm kb-addon-prometheus-server -n kb-system --patch-file $CLOUD_DIR/kb-addon-prometheus-server-patch.yaml

get_prompt "patching_ingress"
kubectl patch cm -n ingress-nginx ingress-nginx-controller --patch '{"data":{"allow-snippet-annotations":"true","annotation-value-word-blocklist":"load_module,lua_package,_by_lua,location,root,proxy_pass,serviceaccount"}}'
kubectl -n ingress-nginx patch ds ingress-nginx-controller -p '{"spec":{"template":{"spec":{"tolerations":[{"key":"node-role.kubernetes.io/control-plane","operator":"Exists","effect":"NoSchedule"}]}}}}'
kubectl get daemonset ingress-nginx-controller -n ingress-nginx -o json | grep https-port= >/dev/null || kubectl patch daemonset ingress-nginx-controller -n ingress-nginx --type='json' -p="[{'op': 'add', 'path': '/spec/template/spec/containers/0/args/-', 'value': '--https-port=${cloud_port:-443}'}]"
kubectl get daemonset ingress-nginx-controller -n ingress-nginx -o json | grep default-ssl-certificate= >/dev/null || kubectl patch daemonset ingress-nginx-controller -n ingress-nginx --type='json' -p="[{'op': 'add', 'path': '/spec/template/spec/containers/0/args/-', 'value': '--default-ssl-certificate=sealos-system/wildcard-cert'}]"

kubectl patch cm kb-addon-prometheus-server -n kb-system --patch-file $CLOUD_DIR/kb-addon-prometheus-server-patch.yaml

get_prompt "installing_cloud"

setMongoVersion
Expand Down

0 comments on commit 6569cc7

Please sign in to comment.