Browse Source

fix build and health check

zhiqiang.yu 4 tuần trước cách đây
mục cha
commit
1852bb71ab
2 tập tin đã thay đổi với 9 bổ sung10 xóa
  1. 1 2
      poyee-app/DEV/cfg.yaml
  2. 8 8
      poyee-app/DEV/deployment.yaml

+ 1 - 2
poyee-app/DEV/cfg.yaml

@@ -7,8 +7,7 @@ project:
     version: ''
     module: 'poyi-app'
     jar: 'poyi-app.jar'
-
-
+    health: '/health'
   k3s:
     kubeconfig: k3s/k3s-dev6.yaml
     cpu_limits: 850m

+ 8 - 8
poyee-app/DEV/deployment.yaml

@@ -2,7 +2,7 @@ apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: <service_name><service_version>
-  namespace: ahxpm
+  namespace: default
 spec:
   strategy:
     type: RollingUpdate
@@ -28,13 +28,13 @@ spec:
         image: <docker_image>
         command: ["java"]
         args: <java_args>
-        #readinessProbe:
-        #  httpGet:
-        #    path: <service_health>
-        #    port: 80
-        #  initialDelaySeconds: 15
-        #  periodSeconds: 30
-        #  failureThreshold: 3
+        readinessProbe:
+          httpGet:
+            path: <service_health>
+            port: 80
+          initialDelaySeconds: 15
+          periodSeconds: 30
+          failureThreshold: 3
         ports:
         - name: http
           containerPort: 80