作者 Administrator

更新 install.sh

#!/bin/bash
export PATH=/root/local/bin:$PATH
kubectl -n mmm-suplus-test get pods | grep -q mmm-partnermg
kubectl -n mmm-suplus-test get pods | grep -q mmm-partnermg
if [ "$?" == "1" ];then
kubectl create -f /tmp/test/partnermg/partner.yaml --record
kubectl -n mmm-suplus-test get svc | grep -q mmm-partnermg
kubectl -n mmm-suplus-test get svc | grep -q mmm-partnermg
if [ "$?" == "0" ];then
echo "partner service install success!"
else
echo "partner service install fail!"
fi
kubectl -n mmm-suplus-test get pods | grep -q mmm-partnermg
kubectl -n mmm-suplus-test get pods | grep -q mmm-partnermg
if [ "$?" == "0" ];then
echo "partner deployment install success!"
else
... ... @@ -17,24 +17,24 @@ if [ "$?" == "1" ];then
fi
else
kubectl delete -f /tmp/test/partnermg/partner.yaml
kubectl -n mmm-suplus-test get svc | grep -q mmm-partnermg
kubectl -n mmm-suplus-test get svc | grep -q mmm-partnermg
while [ "$?" == "0" ]
do
kubectl -n mmm-suplus-test get svc | grep -q pammm-partnermg
kubectl -n mmm-suplus-test get svc | grep -q mmm-partnermg
done
kubectl -n mmm-suplus-test get pods | grep -q mmm-partnermg
kubectl -n mmm-suplus-test get pods | grep -q mmm-partnermg
while [ "$?" == "0" ]
do
kubectl -n mmm-suplus-test get pods | grep -q mmm-partnermg
kubectl -n mmm-suplus-test get pods | grep -q mmm-partnermg
done
kubectl create -f /tmp/test/partnermg/partner.yaml --record
kubectl -n mmm-suplus-test get svc | grep -q mmm-partnermg
kubectl -n mmm-suplus-test get svc | grep -q mmm-partnermg
if [ "$?" == "0" ];then
echo "partner service update success!"
else
echo "partner service update fail!"
fi
kubectl -n mmm-suplus-test get pods | grep -q mmm-partnermg
kubectl -n mmm-suplus-test get pods | grep -q mmm-partnermg
if [ "$?" == "0" ];then
echo "partner deployment update success!"
else
... ...