summaryrefslogtreecommitdiff
path: root/update_controllers.sh
blob: 5e11434d1d9be29d1ce3705f2c172334e4fd4396 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env bash

if [ -z "$1" ]
then
    echo "Must supply a docker tag"
    exit 1
fi

TAG=$1

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}
done