mirror of https://github.com/codevalet/codevalet
Update the rolling-update-canary script to kill containers in the right namespace
Since canary is defined as a Deployment with an ImagePullPolicy of Always,
killing a pod is sufficient to deploy a new version of the app 👏
This commit is contained in:
parent
21f17763fa
commit
10fb3cb454
|
@ -1,3 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
exec kubectl rolling-update canary --image=rtyler/codevalet-canary:latest --image-pull-policy=Always --update-period=10s
|
||||
NAMESPACE=canary
|
||||
for pod in $(kubectl get pods --namespace=${NAMESPACE} -l app=canary -o name); do
|
||||
echo ">> Terminating ${pod}"
|
||||
kubectl delete --namespace=${NAMESPACE} ${pod}
|
||||
# Sleep to allow Kubernetes to pull the latest image
|
||||
sleep 5
|
||||
done;
|
||||
|
|
Loading…
Reference in New Issue