Skip to content

Commit

Permalink
Merge pull request #5987 from carsonoid/bootstrap-k3s-fix
Browse files Browse the repository at this point in the history
Change bootstrap.sh k3s error to a warning
  • Loading branch information
morgo authored Mar 31, 2020
2 parents 4362054 + 4055b78 commit 69afb4e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down
11 changes: 11 additions & 0 deletions examples/local/scripts/k3s-up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 69afb4e

Please sign in to comment.