zyx 2 ani în urmă
părinte
comite
684a98b79f
2 a modificat fișierele cu 44 adăugiri și 0 ștergeri
  1. 6 0
      binlog.sh
  2. 38 0
      taide-binlog.yml

+ 6 - 0
binlog.sh

@@ -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

+ 38 - 0
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:
+        k8s-app: taide-binlog
+    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
+          name: taide-binlog
+          resources:
+            limits:
+              cpu: 100m
+              memory: 515Mi
+            requests:
+              cpu: 100m
+              memory: 50Mi
+      dnsPolicy: ClusterFirst
+      terminationGracePeriodSeconds: 10
+