Unverified Commit 021350e7 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Add "configure-node --first-setup" to force running of setup

parent 06d5f01f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ $0 [-h] [-i INTERFACE] [-d DOMAIN] [-t TOKEN] [-u <control|gateway>]
-t|--token      Join a cluster using TOKEN
-u|--use        Configure the node for the comma separated uses. 
                Choices out of: control, gateway
-f|--first-setup  Force running the ./setup script
"

shopt -s lastpipe
@@ -28,6 +29,7 @@ while let $#; do
		-d|--domain) API_DOMAIN=$2; shift ;;
		-t|--token) TOKEN=$2; shift ;;
		-u|--use) split uses "$2"; shift ;;
		-f|--first-setup) DO_SETUP=true ;;
	esac
	shift
done
@@ -38,7 +40,7 @@ done

has jq || packages+=(jq)

if ! has kubeadm || ! has kubectl; then
if [[ -v DO_SETUP ]] || ! has kubeadm || ! has kubectl; then
	"$SCRIPTS/setup" "${packages[@]}"
elif [[ -v packages[0] ]]; then
	apt-get update