作者 yangfu
... ... @@ -14,11 +14,11 @@ JwtAuth:
Expire: 360000
Redis:
Host: 192.168.0.243:6379
Host: 192.168.0.243:30379
Type: node
Pass:
DB:
DataSource: host=114.55.200.59 user=postgres password=eagle1010 dbname=sumifcc-bchart-prd port=31543 sslmode=disable TimeZone=Asia/Shanghai
DataSource: host=114.55.200.59 user=postgres password=eagle1010 dbname=sumifcc-bchart-prd port=31544 sslmode=disable TimeZone=Asia/Shanghai
ByteMetadata:
Name: ApiByteMetadata
... ...
#!/bin/bash
export PATH=/root/local/bin:$PATH
kubectl -n mmm-suplus-prd get pods | grep -q sumifcc-bchart
if [ "$?" == "1" ];then
kubectl create -f /tmp/prd/sumifcc-bchart/sumifcc-bchart.yaml --record
kubectl -n mmm-suplus-prd get svc | grep -q sumifcc-bchart
if [ "$?" == "0" ];then
echo "sumifcc-bchart service install success!"
else
echo "sumifcc-bchart service install fail!"
fi
kubectl -n mmm-suplus-prd get pods | grep -q sumifcc-bchart
if [ "$?" == "0" ];then
echo "sumifcc-bchart deployment install success!"
else
echo "sumifcc-bchart deployment install fail!"
fi
else
kubectl delete -f /tmp/prd/sumifcc-bchart/sumifcc-bchart.yaml
kubectl -n mmm-suplus-prd get svc | grep -q sumifcc-bchart
while [ "$?" == "0" ]
do
kubectl -n mmm-suplus-prd get svc | grep -q sumifcc-bchart
done
kubectl -n mmm-suplus-prd get pods | grep -q sumifcc-bchart
while [ "$?" == "0" ]
do
kubectl -n mmm-suplus-prd get pods | grep -q sumifcc-bchart
done
kubectl create -f /tmp/prd/sumifcc-bchart/sumifcc-bchart.yaml --record
kubectl -n mmm-suplus-prd get svc | grep -q sumifcc-bchart
if [ "$?" == "0" ];then
echo "sumifcc-bchart service update success!"
else
echo "sumifcc-bchart service update fail!"
fi
kubectl -n mmm-suplus-prd get pods | grep -q sumifcc-bchart
if [ "$?" == "0" ];then
echo "sumifcc-bchart deployment update success!"
else
echo "sumifcc-bchart deployment update fail!"
fi
fi
\ No newline at end of file
... ...
apiVersion: v1
kind: Service
metadata:
name: sumifcc-bchart
namespace: mmm-suplus-prd
labels:
k8s-app: sumifcc-bchart
spec:
ports:
- name: "http"
port: 80
targetPort: 8080
selector:
k8s-app: sumifcc-bchart
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: sumifcc-bchart
namespace: mmm-suplus-prd
labels:
k8s-app: sumifcc-bchart
spec:
replicas: 1
template:
metadata:
labels:
k8s-app: sumifcc-bchart
spec:
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- preference: {}
weight: 100
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- cn-hangzhou.i-bp1djh1xn7taumbue1zd
containers:
- name: sumifcc-bchart
image: 192.168.0.243:5000/mmm/sumifcc-bchart:master
imagePullPolicy: Always
ports:
- containerPort: 8080
volumeMounts:
- mountPath: /opt/logs
name: accesslogs
env:
- name: LOG_LEVEL
value: "debug"
- name: ERROR_BASE_CODE
value: "1"
- name: ERROR_BASE_CODE_MULTIPLE
value: "1000"
volumes:
- name: accesslogs
emptyDir: {}
\ No newline at end of file
... ...