Skip to content

Commit

Permalink
Add option to explicitly start agent with no roles
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuildthecloud committed May 5, 2021
1 parent 053e074 commit 6e43290
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ fi
# - CATTLE_ROLE_CONTROLPLANE=false
# - CATTLE_ROLE_ETCD=false
# - CATTLE_ROLE_WORKER=false
# - CATTLE_ROLE_NONE=false
# - CATTLE_LABELS
# - CATTLE_TAINTS
#
Expand Down Expand Up @@ -133,6 +134,10 @@ setup_env() {
CATTLE_ROLE_WORKER=false
fi

if [ -z "${CATTLE_ROLE_NONE}" ]; then
CATTLE_ROLE_NONE=false
fi

if [ -z "${CATTLE_REMOTE_ENABLED}" ]; then
CATTLE_REMOTE_ENABLED=true
else
Expand Down Expand Up @@ -185,7 +190,7 @@ setup_env() {
if [ -z "${CATTLE_SERVER}" ]; then
fatal "\$CATTLE_SERVER was not set"
fi
if [ "${CATTLE_ROLE_CONTROLPLANE}" = "false" ] && [ "${CATTLE_ROLE_ETCD}" = "false" ] && [ "${CATTLE_ROLE_WORKER}" = "false" ]; then
if [ "${CATTLE_ROLE_CONTROLPLANE}" = "false" ] && [ "${CATTLE_ROLE_ETCD}" = "false" ] && [ "${CATTLE_ROLE_WORKER}" = "false" ] && [ "${CATTLE_ROLE_NONE}" = "false" ]; then
fatal "You must select at least one role."
fi
fi
Expand Down

0 comments on commit 6e43290

Please sign in to comment.