作者 yangfu

Merge branch 'test' of http://gitlab.fjmaimaimai.com/mmm-go/opp into test

#!/bin/bash
export PATH=/root/local/bin:$PATH
kubectl -n mmm-suplus-test get pods | grep -q opp
kubectl -n mmm-suplus-test get pods | grep -q mmmopp
if [ "$?" == "1" ];then
kubectl create -f /tmp/test/mmm-go-opp/opp.yaml --record
kubectl -n mmm-suplus-test get svc | grep -q opp
kubectl -n mmm-suplus-test get svc | grep -q mmmopp
if [ "$?" == "0" ];then
echo "opp service install success!"
echo "mmmopp service install success!"
else
echo "opp service install fail!"
echo "mmmopp service install fail!"
fi
kubectl -n mmm-suplus-test get pods | grep -q opp
kubectl -n mmm-suplus-test get pods | grep -q mmmopp
if [ "$?" == "0" ];then
echo "opp deployment install success!"
echo "mmmopp deployment install success!"
else
echo "opp deployment install fail!"
echo "mmmopp deployment install fail!"
fi
else
kubectl delete -f /tmp/test/mmm-go-opp/opp.yaml
kubectl -n mmm-suplus-test get svc | grep -q opp
kubectl -n mmm-suplus-test get svc | grep -q mmmopp
while [ "$?" == "0" ]
do
kubectl -n mmm-suplus-test get svc | grep -q opp
kubectl -n mmm-suplus-test get svc | grep -q mmmopp
done
kubectl -n mmm-suplus-test get pods | grep -q opp
kubectl -n mmm-suplus-test get pods | grep -q mmmopp
while [ "$?" == "0" ]
do
kubectl -n mmm-suplus-test get pods | grep -q opp
kubectl -n mmm-suplus-test get pods | grep -q mmmopp
done
kubectl create -f /tmp/test/mmm-go-opp/opp.yaml --record
kubectl -n mmm-suplus-test get svc | grep -q opp
kubectl -n mmm-suplus-test get svc | grep -q mmmopp
if [ "$?" == "0" ];then
echo "opp service update success!"
echo "mmmopp service update success!"
else
echo "opp service update fail!"
fi
... ...
... ... @@ -44,13 +44,13 @@ spec:
- cn-hangzhou.i-bp1hyp5oips9cdwxxgxy
containers:
- name: mmmopp
image: 192.168.0.243:5000/mmm/mmmopp:test
image: 192.168.0.243:5000/mmm/mmmopp:dev
imagePullPolicy: Always
volumeMounts:
- mountPath: /opt/logs
name: accesslogs
- mountPath: /var/www/opp-test/file
name: mmmjihuitest-pvc1
name: mmmjihuitest2-pvc1
ports:
- containerPort: 8080
env:
... ... @@ -97,6 +97,6 @@ spec:
volumes:
- name: accesslogs
emptyDir: {}
- name: mmmjihuitest-pvc1
- name: mmmjihuitest2-pvc1
persistentVolumeClaim:
claimName: mmmjihuitest-pvc
\ No newline at end of file
claimName: mmmjihuitest2-pvc
\ No newline at end of file
... ...