From 7ef3241f1beb7bbddbf574a5ea3257f627c46ad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=87=E5=AE=B8=E8=88=9C?= Date: Wed, 26 May 2021 18:23:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E5=8D=B7=EF=BC=8Ck8s?= =?UTF-8?q?=E6=8E=A2=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deployment-sim.yaml | 49 ++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/deployment-sim.yaml b/deployment-sim.yaml index 791e4f0..7eeab29 100644 --- a/deployment-sim.yaml +++ b/deployment-sim.yaml @@ -22,12 +22,11 @@ spec: annotations: prometheus.io/port: '18012' prometheus.io/jl-pod: 'true' - spec: + spec: volumes: - - name: log - persistentVolumeClaim: - claimName: log-pvc - readOnly: false + - name: log + hostPath: + path: /var/lib/docker/log/349553515466-preprod/default-group/all affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: @@ -46,26 +45,26 @@ spec: - name: log mountPath: /log ports: - - containerPort: 18012 #[8] 容器需要监听的端口号,与配置文件中的server.port参数相同,与参数[4]相同 -# livenessProbe: -# failureThreshold: 3 -# httpGet: -# port: 18012 #[11] pod存活检测端口,修改为该微服务配置文件中server.port的端口号,与参数[5]相同 -# path: /actuator/prometheus -# scheme: HTTP -# initialDelaySeconds: 300 -# periodSeconds: 60 -# successThreshold: 1 -# timeoutSeconds: 2 -# readinessProbe: -# failureThreshold: 1 -# httpGet: -# port: 18012 #[12] pod就绪检测端口,修改为该微服务配置文件中server.port的端口号,与参数[5]相同 -# path: /actuator/prometheus -# scheme: HTTP -# periodSeconds: 5 -# successThreshold: 2 -# timeoutSeconds: 2 + - containerPort: 18012 + livenessProbe: + failureThreshold: 3 + httpGet: + port: 18012 + path: /actuator/health + scheme: HTTP + initialDelaySeconds: 300 + periodSeconds: 60 + successThreshold: 1 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 1 + httpGet: + port: 18012 + path: /actuator/health + scheme: HTTP + periodSeconds: 5 + successThreshold: 2 + timeoutSeconds: 2 resources: requests: cpu: 1000m