mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-21 13:54:15 -07:00
cleanup
This commit is contained in:
parent
cfbd7e3bf5
commit
5c1fc43610
2 changed files with 0 additions and 0 deletions
9
attic/cycle_controllers.sh
Executable file
9
attic/cycle_controllers.sh
Executable 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
26
attic/update_controllers.sh
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue