script: remove containers block
This commit is contained in:
parent
d5f0e54075
commit
35771e4e94
22
update.sh
22
update.sh
|
@ -6,7 +6,6 @@ USER=""
|
||||||
NAMESPACE=""
|
NAMESPACE=""
|
||||||
CLUSTER=""
|
CLUSTER=""
|
||||||
DEPLOYMENTS=""
|
DEPLOYMENTS=""
|
||||||
CONTAINERS=""
|
|
||||||
SERVER_URL=""
|
SERVER_URL=""
|
||||||
|
|
||||||
# set globals
|
# set globals
|
||||||
|
@ -113,31 +112,18 @@ pollDeploymentRollout(){
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
startDeployment(){
|
|
||||||
local NAMESPACE=$1; shift
|
|
||||||
local DEPLOY=$1; shift
|
|
||||||
local CONTAINER=$1
|
|
||||||
|
|
||||||
kubectl -n ${NAMESPACE} set image deployment/${DEPLOY} \
|
|
||||||
*="${PLUGIN_REPO}:${PLUGIN_TAG}" --record
|
|
||||||
pollDeploymentRollout ${NAMESPACE} ${DEPLOY}
|
|
||||||
if [ "$?" -eq 0 ]; then
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
startDeployments(){
|
startDeployments(){
|
||||||
local CLUSTER=$1; shift
|
local CLUSTER=$1; shift
|
||||||
local NAMESPACE=$1
|
local NAMESPACE=$1
|
||||||
|
|
||||||
IFS=',' read -r -a DEPLOYMENTS <<< "${PLUGIN_DEPLOYMENT}"
|
IFS=',' read -r -a DEPLOYMENTS <<< "${PLUGIN_DEPLOYMENT}"
|
||||||
IFS=',' read -r -a CONTAINERS <<< "${PLUGIN_CONTAINER}"
|
|
||||||
|
|
||||||
for DEPLOY in ${DEPLOYMENTS[@]}; do
|
for DEPLOY in ${DEPLOYMENTS[@]}; do
|
||||||
echo "[INFO] Deploying ${DEPLOY} to ${CLUSTER} ${NAMESPACE}"
|
echo "[INFO] Deploying ${DEPLOY} to ${CLUSTER} ${NAMESPACE}"
|
||||||
startDeployment ${NAMESPACE} ${DEPLOY} ${CONTAINER}
|
kubectl -n ${NAMESPACE} set image deployment/${DEPLOY} \
|
||||||
|
*="${PLUGIN_REPO}:${PLUGIN_TAG}" --record
|
||||||
|
pollDeploymentRollout ${NAMESPACE} ${DEPLOY}
|
||||||
|
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
continue
|
continue
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue