diff --git a/bootstrap.sh b/bootstrap.sh index 40e26ad7ce0..91d30e535b3 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -172,13 +172,13 @@ function install_k3s() { case $(uname) in Linux) local platform=linux;; - *) echo "ERROR: unsupported platform. K3s only supports running on Linux"; exit 1;; + *) echo "WARNING: unsupported platform. K3s only supports running on Linux, the k8s topology will not be available for local examples."; return;; esac case $(get_arch) in aarch64) local target="-arm64";; x86_64) local target="";; - *) echo "ERROR: unsupported architecture"; exit 1;; + *) echo "WARNING: unsupported architecture, the k8s topology will not be available for local examples."; return;; esac download_url=https://github.com/rancher/k3s/releases/download @@ -191,7 +191,6 @@ function install_k3s() { } command -v k3s || install_dep "k3s" "v1.0.0" "$VTROOT/dist/k3s" install_k3s - # Download and install consul, link consul binary into our root. function install_consul() { local version="$1" diff --git a/examples/local/scripts/k3s-up.sh b/examples/local/scripts/k3s-up.sh index 3b77600018e..eb8530f15d8 100755 --- a/examples/local/scripts/k3s-up.sh +++ b/examples/local/scripts/k3s-up.sh @@ -25,6 +25,17 @@ script_root=$(dirname "${BASH_SOURCE[0]}") # shellcheck disable=SC1091 source ./env.sh +case $(uname) in + Linux) ;; + *) echo "WARNING: unsupported platform. K3s only supports running on Linux, the k8s topology is available for local examples."; exit 1;; +esac + +case $(uname -m) in + aarch64) ;; + x86_64) ;; + *) echo "ERROR: unsupported architecture, the k8s topology is not available for local examples."; exit 1;; +esac + k3s server --disable-agent --data-dir "${VTDATAROOT}/k3s/" --https-listen-port "${K8S_PORT}" --write-kubeconfig "${K8S_KUBECONFIG}" > "${VTDATAROOT}"/tmp/k3s.out 2>&1 & PID=$! echo $PID > "${VTDATAROOT}/tmp/k3s.pid"