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