瀏覽代碼

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

datard 3 年之前
父節點
當前提交
192f88f0bf
共有 1 個文件被更改,包括 16 次插入12 次删除
  1. 16 12
      deploy-tmp.yaml

+ 16 - 12
deploy-tmp.yaml

@@ -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: /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
@@ -86,12 +99,3 @@ metadata:
   namespace: qa
   annotations:
     kubernetes.io/ingress.class: nginx
-spec:
-  rules:
-    - host: offline-process-charge-qa.ieasou.cn
-      http:
-        paths:
-          - path: /
-            backend:
-              serviceName: offline-process-charge-svc
-              servicePort: 80