From e8319836b59668a047343d4509e4c20d4c6c51dc 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:01:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A5=E5=BF=97=E6=8C=82?= =?UTF-8?q?=E5=9C=A8=E5=8D=B7=E4=BD=8D=E7=BD=AE=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?k8s=E6=8E=A2=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sim.yaml | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/sim.yaml b/sim.yaml index 3496368..d507c81 100644 --- a/sim.yaml +++ b/sim.yaml @@ -22,11 +22,11 @@ spec: annotations: prometheus.io/port: '18018' prometheus.io/jl-pod: 'true' - spec: + spec: volumes: - - name: log - persistentVolumeClaim: - claimName: log-pvc + - name: log + hostPath: + path: /var/lib/docker/log/349553515466-preprod/default-group/all readOnly: false affinity: podAntiAffinity: @@ -41,31 +41,31 @@ spec: containers: - name: biz-service-ebtp-extend #[6] 必选,容器名称,可填写微服务名称 image: harbor.dcos.guangzhou.unicom.local/eshop/biz-service-ebtp-extend:latest #[7] 镜像名称,请把biz-service-ebtp-extend替换为服务名称 - args: ["java","-Djava.security.egd=file:/dev/./urandom", "-javaagent:/pinpoint/tianyan-springboot-agent/pinpoint-bootstrap-1.8.0.jar", "-Dpinpoint.agentId=$(MY_POD_IP)", "-Dpinpoint.applicationName=$(APP_NAME)", "-Dpinpoint.licence=$(AGENT_LICENCE_DEV)", "-Dspring.profiles.active=sim", "-jar", "/app.jar"] + args: ["java","-Djava.security.egd=file:/dev/./urandom", "-javaagent:/pinpoint/tianyan-springboot-agent/pinpoint-bootstrap-1.8.0.jar", "-Dpinpoint.agentId=$(MY_POD_IP)", "-Dpinpoint.applicationName=$(APP_NAME)", "-Dpinpoint.licence=$(AGENT_LICENCE_DEV)", "-jar", "/app.jar"] volumeMounts: - name: log mountPath: /log ports: - - containerPort: 18018 #[8] 容器需要监听的端口号,与配置文件中的server.port参数相同,与参数[4]相同 - #livenessProbe: - # failureThreshold: 3 - # httpGet: - # port: 18018 #[11] pod存活检测端口,修改为该微服务配置文件中server.port的端口号,与参数[5]相同 - # path: /actuator/prometheus - # scheme: HTTP - # initialDelaySeconds: 300 - # periodSeconds: 60 - # successThreshold: 1 - # timeoutSeconds: 2 - #readinessProbe: - # failureThreshold: 1 - # httpGet: - # port: 18018 #[12] pod就绪检测端口,修改为该微服务配置文件中server.port的端口号,与参数[5]相同 - # path: /actuator/prometheus - # scheme: HTTP - # periodSeconds: 5 - # successThreshold: 2 - # timeoutSeconds: 2 + - containerPort: 18018 + livenessProbe: + failureThreshold: 3 + httpGet: + port: 18018 + path: /actuator/health + scheme: HTTP + initialDelaySeconds: 300 + periodSeconds: 60 + successThreshold: 1 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 1 + httpGet: + port: 18018 + path: /actuator/health + scheme: HTTP + periodSeconds: 5 + successThreshold: 2 + timeoutSeconds: 2 resources: requests: cpu: 1000m