修改日志挂在卷位置,增加k8s探针

This commit is contained in:
万宸舜
2021-05-26 18:01:41 +08:00
parent 4fe1d2814b
commit e8319836b5

View File

@ -25,8 +25,8 @@ spec:
spec: spec:
volumes: volumes:
- name: log - name: log
persistentVolumeClaim: hostPath:
claimName: log-pvc path: /var/lib/docker/log/349553515466-preprod/default-group/all
readOnly: false readOnly: false
affinity: affinity:
podAntiAffinity: podAntiAffinity:
@ -41,31 +41,31 @@ spec:
containers: containers:
- name: biz-service-ebtp-extend #[6] 必选,容器名称,可填写微服务名称 - name: biz-service-ebtp-extend #[6] 必选,容器名称,可填写微服务名称
image: harbor.dcos.guangzhou.unicom.local/eshop/biz-service-ebtp-extend:latest #[7] 镜像名称请把biz-service-ebtp-extend替换为服务名称 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: volumeMounts:
- name: log - name: log
mountPath: /log mountPath: /log
ports: ports:
- containerPort: 18018 #[8] 容器需要监听的端口号与配置文件中的server.port参数相同与参数[4]相同 - containerPort: 18018
#livenessProbe: livenessProbe:
# failureThreshold: 3 failureThreshold: 3
# httpGet: httpGet:
# port: 18018 #[11] pod存活检测端口,修改为该微服务配置文件中server.port的端口号,与参数[5]相同 port: 18018
# path: /actuator/prometheus path: /actuator/health
# scheme: HTTP scheme: HTTP
# initialDelaySeconds: 300 initialDelaySeconds: 300
# periodSeconds: 60 periodSeconds: 60
# successThreshold: 1 successThreshold: 1
# timeoutSeconds: 2 timeoutSeconds: 2
#readinessProbe: readinessProbe:
# failureThreshold: 1 failureThreshold: 1
# httpGet: httpGet:
# port: 18018 #[12] pod就绪检测端口,修改为该微服务配置文件中server.port的端口号,与参数[5]相同 port: 18018
# path: /actuator/prometheus path: /actuator/health
# scheme: HTTP scheme: HTTP
# periodSeconds: 5 periodSeconds: 5
# successThreshold: 2 successThreshold: 2
# timeoutSeconds: 2 timeoutSeconds: 2
resources: resources:
requests: requests:
cpu: 1000m cpu: 1000m