ZeroTierOne/update_controllers.sh

19 lines
399 B
Bash
Raw Normal View History

#!/usr/bin/env bash
if [ -z "$1" ]
then
echo "Must supply a docker tag"
exit 1
fi
TAG=$1
2018-11-30 18:37:27 +00:00
CONTROLLERS=`kubectl get pods -o=name | grep controller | sed "s/^.\{4\}//" | cut -d '-' -f 2`
for c in ${CONTROLLERS[@]}
do
kubectl set image deployment controller-${c} ztcentral-controller=gcr.io/zerotier-central/ztcentral-controller:${TAG}
2018-12-07 23:17:12 +00:00
echo "Sleeping for 1 minute"
sleep 60
done