From 00f8f1dfe38056d07a34d8035abbb7cebf34ccc6 Mon Sep 17 00:00:00 2001 From: llhuii Date: Sat, 30 Oct 2021 09:12:28 +0800 Subject: [PATCH] all-in-one: add NO_INSTALL_SEDNA variable flag If NO_INSTALL_SEDNA not 'false', don't install Sedna, it's useful to develop, the developer will install Sedna later by manually. Signed-off-by: llhuii --- scripts/installation/all-in-one.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/installation/all-in-one.sh b/scripts/installation/all-in-one.sh index 10cc26d6..101c9f56 100755 --- a/scripts/installation/all-in-one.sh +++ b/scripts/installation/all-in-one.sh @@ -36,6 +36,7 @@ # SEDNA_VERSION | optional | The Sedna version to be installed. # if not specified, it will get latest release or v0.4.1 # CLUSTER_NAME | optional | The all-in-one cluster name, default 'sedna-mini' +# NO_INSTALL_SEDNA | optional | If 'false', install Sedna, else no install, default false. # FORCE_INSTALL_SEDNA | optional | If 'true', force reinstall Sedna, default false. # NODE_IMAGE | optional | Custom node image # REUSE_EDGE_CONTAINER | optional | Whether reuse edge node containers or not, default is true @@ -86,6 +87,10 @@ function prepare_env() { # default is true : ${REUSE_EDGE_CONTAINER:=true} + # whether install sedna control plane or not + # false means install, other values mean no install + : ${NO_INSTALL_SEDNA:=false} + # force install sedna control plane # default is false : ${FORCE_INSTALL_SEDNA:=false} @@ -394,6 +399,10 @@ function clean_edge() { } function install_sedna() { + if [[ "$NO_INSTALL_SEDNA" != "false" ]]; then + return + fi + if run_in_control_plane kubectl get ns sedna; then if [ "$FORCE_INSTALL_SEDNA" != true ]; then log_info '"sedna" namespace already exists, no install Sedna control components.'