@@ -0,0 +1,6 @@
+version=$(date +%s)
+docker build -t registry.cn-chengdu.aliyuncs.com/cxzx-spider/taide-binlog:$version .
+docker push registry.cn-chengdu.aliyuncs.com/cxzx-spider/taide-binlog:$version
+sed -i "s!{ { image } }!registry\.cn-chengdu\.aliyuncs\.com/cxzx-spider/taide-binlog:$version!g" *.yml
+
+kubectl apply -f taide-binlog.yml
@@ -0,0 +1,38 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: taide-binlog
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ k8s-app: taide-binlog
+ strategy:
+ type: Recreate
+ template:
+ metadata:
+ labels:
+ spec:
+ imagePullSecrets:
+ - name: registry-key
+ containers:
+ - command: [ "java","-cp","/app.jar","com.cxzx.canal.CanalClientMain" ]
+ env:
+ - name: PATH
+ value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ - name: TZ
+ value: Asia/Shanghai
+ image: { { image } }
+ imagePullPolicy: IfNotPresent
+ resources:
+ limits:
+ cpu: 100m
+ memory: 515Mi
+ requests:
+ memory: 50Mi
+ dnsPolicy: ClusterFirst
+ terminationGracePeriodSeconds: 10