From d5f0e5407599d9b5fa1b4181f42cf96d9bec4b82 Mon Sep 17 00:00:00 2001 From: hashfyre Date: Mon, 5 Mar 2018 18:57:56 +0530 Subject: [PATCH] script: update all containers of a dep to an image --- update.sh | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/update.sh b/update.sh index 43519e7..c4d79b0 100755 --- a/update.sh +++ b/update.sh @@ -119,8 +119,7 @@ startDeployment(){ local CONTAINER=$1 kubectl -n ${NAMESPACE} set image deployment/${DEPLOY} \ - ${CONTAINER}="${PLUGIN_REPO}:${PLUGIN_TAG}" --record - + *="${PLUGIN_REPO}:${PLUGIN_TAG}" --record pollDeploymentRollout ${NAMESPACE} ${DEPLOY} if [ "$?" -eq 0 ]; then return 0 @@ -138,14 +137,12 @@ startDeployments(){ for DEPLOY in ${DEPLOYMENTS[@]}; do echo "[INFO] Deploying ${DEPLOY} to ${CLUSTER} ${NAMESPACE}" - for CONTAINER in ${CONTAINERS[@]}; do - startDeployment ${NAMESPACE} ${DEPLOY} ${CONTAINER} - if [ "$?" -eq 0 ]; then - continue - else - exit 0 - fi - done + startDeployment ${NAMESPACE} ${DEPLOY} ${CONTAINER} + if [ "$?" -eq 0 ]; then + continue + else + exit 0 + fi done }