This commit is contained in:
Adam Ierymenko 2019-08-19 20:29:24 -07:00
commit 5c1fc43610
No known key found for this signature in database
GPG key ID: 1657198823E52A61
2 changed files with 0 additions and 0 deletions

9
attic/cycle_controllers.sh Executable file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
CONTROLLERS=`kubectl get pods -o=name | grep controller | sed "s/^.\{4\}//"`
for c in ${CONTROLLERS[@]}
do
kubectl delete pod ${c}
sleep 30
done

26
attic/update_controllers.sh Executable file
View file

@ -0,0 +1,26 @@
#!/usr/bin/env bash
if [ -z "$1" ]
then
echo "Usage: $0 <docker_tag> <k8s_namespace>"
echo " k8s_namesapce is set to default if not specified"
exit 1
fi
if [ -z "$2" ]
then
NAMESPACE=default
else
NAMESPACE=$2
fi
TAG=$1
CONTROLLERS=`kubectl get pods -o=name --namespace=${NAMESPACE} | grep controller | sed "s/^.\{4\}//" | cut -d '-' -f 2`
for c in ${CONTROLLERS[@]}
do
kubectl set image deployment --namespace=${NAMESPACE} controller-${c} ztcentral-controller=docker.zerotier.com/zerotier-central/ztcentral-controller:${TAG}
echo "Sleeping for 1 minute"
sleep 60
done