Change the webapp update script to follow the same pattern as canary

This commit is contained in:
R. Tyler Croy 2017-12-15 08:37:00 -08:00
parent 7642336f1a
commit 4b822e607f
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
1 changed files with 6 additions and 5 deletions

View File

@ -1,7 +1,8 @@
#!/bin/sh
POD=$(kubectl get pods --namespace=webapp -l app=webapp | tail -n 1 | awk '{ print $1 }')
echo ">> Killing ${POD}"
exec kubectl delete pod --namespace=webapp ${POD}
NAMESPACE=webapp
for pod in $(kubectl get pods --namespace=${NAMESPACE} -l app=webapp -o name); do
echo ">> Terminating ${pod}"
kubectl delete --namespace=${NAMESPACE} ${pod}
# Sleep to allow Kubernetes to pull the latest image
done;