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

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

View File

@ -24,9 +24,9 @@ spec:
prometheus.io/jl-pod: 'true'
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