Эх сурвалжийг харах

deploy qa/offline-process-charge-callback:v1.0.26 运行环境test

datard 3 жил өмнө
parent
commit
026e6ed94e
3 өөрчлөгдсөн 27 нэмэгдсэн , 14 устгасан
  1. 7 7
      .drone.yml
  2. 1 1
      Dockerfile
  3. 19 6
      deploy-tmp.yaml

+ 7 - 7
.drone.yml

@@ -23,9 +23,9 @@ steps:
     mirror: https://ci7pm4nx.mirror.aliyuncs.com
     registry: hub.evbj.easou.com
     repo: hub.evbj.easou.com/qa/offline-process-charge-callback
-    tag: v1.0.17
+    tag: v1.0.26
 #    build_args:
-#      - JAR_FILE=
+#      - JAR_FILE=offline-process-charge-callback-test.jar
 #      - SERVER_PORT=8080
 
 - name: deployment
@@ -34,8 +34,8 @@ steps:
   # privileged: true
   environment:
     JNLP_ENV: qa
-    JNLP_REPLICAS: 2
-    JNLP_TAG: v1.0.17
+    JNLP_REPLICAS: 1
+    JNLP_TAG: v1.0.26
     JNLP_VERSION: v1  # default v1, v2 for canary
     DEPLOY_ENV: k8s-2 # 可以选择把应用部署到集群:k8s-1 or k8s-2
     JNLP_REPO: hub.evbj.easou.com
@@ -69,8 +69,8 @@ steps:
     corpid: ww419ee4063735e1c0
     corp_secret: zpiRBLETH9eLwIMQ4eJ_r_dcm3BPSGeLHvTcft8Ot-M
     agent_id: 1000004
-    title: "Pipeline qa/offline-process-charge-callback:v1.0.17 Success"
-    description: "${DRONE_BUILD_LINK} qa/offline-process-charge-callback:v1.0.17 部署完成"
+    title: "Pipeline qa/offline-process-charge-callback:v1.0.26 Success"
+    description: "${DRONE_BUILD_LINK} qa/offline-process-charge-callback:v1.0.26 部署完成"
     msg_url: ${DRONE_BUILD_LINK}
     btn_txt: "否"
   when:
@@ -83,7 +83,7 @@ steps:
     corpid: ww419ee4063735e1c0
     corp_secret: zpiRBLETH9eLwIMQ4eJ_r_dcm3BPSGeLHvTcft8Ot-M
     agent_id: 1000004
-    title: "Pipeline qa/offline-process-charge-callback:v1.0.17 Failure"
+    title: "Pipeline qa/offline-process-charge-callback:v1.0.26 Failure"
     description: "${DRONE_BUILD_LINK} 部署失败,请检查配置!"
     msg_url: ${DRONE_BUILD_LINK}
     btn_txt: "否"

+ 1 - 1
Dockerfile

@@ -1 +1 @@
-FROM hub.evbj.easou.com/qa/offline-process-charge-callback:v1.0.17
+FROM hub.evbj.easou.com/qa/offline-process-charge-callback:v1.0.26

+ 19 - 6
deploy-tmp.yaml

@@ -8,7 +8,7 @@ metadata:
     app: offline-process-charge-callback
 spec:
   serviceName: offline-process-charge-callback
-  replicas: 2
+  replicas: 1
   selector:
     matchLabels:
       app: offline-process-charge-callback
@@ -30,7 +30,7 @@ spec:
       #  app.touchrs: touchrs
       containers:
         - name: offline-process-charge-callback
-          image: hub.evbj.easou.com/qa/offline-process-charge-callback:v1.0.17
+          image: hub.evbj.easou.com/qa/offline-process-charge-callback:v1.0.26
           imagePullPolicy: Always
           env:
             - name: JAVA_OPTS
@@ -43,11 +43,24 @@ spec:
           volumeMounts:
             - name: volume
               mountPath: /data
+          lifecycle:
+            preStop:
+              exec:
+                command: ["/bin/sh","-c","curl -u amdin:ea1so2ua3dm4in5 -X POST 127.0.0.1:8080/actuator/shutdown"]
           livenessProbe:
-            tcpSocket:
+            httpGet:
+              path: /actuator/health
               port: 8080
-            initialDelaySeconds: 30
-            periodSeconds: 15
+              httpHeaders:
+              - name: Custom-Header
+                value: Awesome
+              - name: Custom-Header
+                value: Awesome
+            initialDelaySeconds: 30        #60s后启动第一次探测
+            periodSeconds: 10              # 每隔10s启动一次探测
+            timeoutSeconds: 3              # 超时时间3s
+            successThreshold: 1            # 成功1次即表示容器健康
+            failureThreshold: 5            # 连续5次失败,则判定容器不健康,默认3次
           readinessProbe:
             tcpSocket:
               port: 8080
@@ -88,7 +101,7 @@ metadata:
     kubernetes.io/ingress.class: nginx
 spec:
   rules:
-    - host: offline-process-charge-callback-qa.ieasou.cn
+    - host: qa-offline-process-charge-callback.ieasou.cn
       http:
         paths:
           - path: /