Unverified Commit 38c0ebdd authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Add "setup --skip-upgrade" to disable "apt upgrade" step

parent b5ca47a2
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
set -eu

USAGE="Usage:
$0 [-h] [-i INTERFACE] [-d DOMAIN] [-t TOKEN] [-u <control|gateway>]
$0 [-h] [-i INTERFACE] [-d DOMAIN] [-t TOKEN] [-u <control|gateway>] [--skip-upgrade]

-h|--help       Show this usage and exit
-i|--interface  Use the first address of INTERFACE as a API advertisement address
@@ -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
--skip-upgrade  Skip the package manager upgrades step
"

shopt -s lastpipe
@@ -30,6 +31,7 @@ while let $#; do
		-d|--domain) API_DOMAIN=$2; shift ;;
		-t|--token) TOKEN=$2; shift ;;
		-u|--use) split uses "$2"; shift ;;
		--skip-upgrade) SKIP_UPGRADE=true ;;
	esac
	shift
done
@@ -59,7 +61,7 @@ has kubelet || packages+=(kubelet)
add_repo k8s-io k8s-io.key 'https://pkgs.k8s.io/core:/stable:/v1.33/deb/' /
add_repo helm helm.key 'https://baltocdn.com/helm/stable/debian/' all main
apt-get update
apt-get upgrade
[[ -v SKIP_UPGRADE ]] || apt-get upgrade
[[ -v packages[0] ]] && apt-get install -y "${packages[@]}"

install --mode=0644 "$SCRIPTS/containerd.toml" /etc/containerd/config.toml