minor clean
This commit is contained in:
@ -1,26 +1,8 @@
|
||||
#!/bin/bash
|
||||
# @author: Daniel Keszei <keszei.daniel@gmail.com>
|
||||
# @description: Kubernetes cluster withdrawer
|
||||
# @created: 2019-02-26
|
||||
# @version: 1.0
|
||||
|
||||
|
||||
# Variable(s)
|
||||
|
||||
# Script variable(s)
|
||||
PID=$$
|
||||
SCRIPTNAME="$(basename $0)"
|
||||
WORKER_LIST="worker.list"
|
||||
|
||||
# Functions
|
||||
|
||||
#FIXME Write usage message
|
||||
function usage {
|
||||
cat << EOF
|
||||
EOF
|
||||
|
||||
}
|
||||
|
||||
## Send error messages to stderr
|
||||
function echo_err {
|
||||
echo "Error: $@" >&2
|
||||
@ -46,9 +28,6 @@ readarray WORKER < $WORKER_LIST
|
||||
./withdraw/node_reset.sh
|
||||
rm -rf ~/.kube
|
||||
|
||||
#FIXME Does local docker-registry needs removal
|
||||
#./deploy/docker_registry_setup.sh $IP:5000
|
||||
|
||||
# Reset the workers0
|
||||
for LINE in $(cat $WORKER_LIST | grep -vE "^#"); do
|
||||
WORKERNAME=`echo $LINE | awk -F"/" '{print $NF}'`
|
||||
@ -56,8 +35,5 @@ for LINE in $(cat $WORKER_LIST | grep -vE "^#"); do
|
||||
echo "[worker:$WORKERNAME] Evicating..."
|
||||
ssh $WORKERNAME -o "StrictHostKeyChecking no" "bash -s" < ./withdraw/node_reset.sh
|
||||
|
||||
#FIXME Does local docker-registry needs removal
|
||||
# ssh $WORKERNAME -o "StrictHostKeyChecking no" "bash -s" < ./deploy/docker_registry_setup.sh $IP:5000
|
||||
|
||||
echo "[worker:$WORKERNAME] Eviction is completed."
|
||||
done
|
||||
|
Reference in New Issue
Block a user