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