Commit 2c3ca6de authored by 陈健's avatar 陈健

增加探针

parent ae68cadc
......@@ -28,6 +28,28 @@ spec:
- name: http
containerPort: 8080
protocol: TCP
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
httpGet:
path: {{ .Values.livenessProbe.path }}
port: http
{{- end }}
{{- if .Values.readinessProbe.enabled }}
readinessProbe:
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
httpGet:
path: {{.Values.readinessProbe.path }}
port: http
{{- end }}
volumeMounts:
- name: docker-sock-file
mountPath: /var/run/docker.sock # docker sock文件
......
......@@ -65,3 +65,20 @@ nodeSelector: {}
volumes:
hostPath:
path: /var/vcap/sys/run/docker/docker.sock
livenessProbe: # 存活探针
enabled: true
path: /health # 心跳检测的接口,默认都是httpGet请求
initialDelaySeconds: 5 # 容器启动后第一次执行探测是需要等待多少秒。
periodSeconds: 30 # 执行探测的频率。默认是10秒,最小1秒。
timeoutSeconds: 5 # 探测超时时间。默认1秒,最小1秒。
successThreshold: 1 # 探测失败后,最少连续探测成功多少次才被认定为成功。默认是1
failureThreshold: 5 # 探测成功后,最少连续探测失败多少次才被认定为失败。默认是3
readinessProbe: # 就绪探针
enabled: true
path: /health # 心跳检测的接口,默认都是httpGet请求
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 5
......@@ -60,3 +60,21 @@ nodeSelector: {}
volumes:
hostPath:
path: /var/vcap/sys/run/docker/docker.sock
livenessProbe: # 存活探针
enabled: true
path: /health # 心跳检测的接口,默认都是httpGet请求
initialDelaySeconds: 5 # 容器启动后第一次执行探测是需要等待多少秒。
periodSeconds: 30 # 执行探测的频率。默认是10秒,最小1秒。
timeoutSeconds: 5 # 探测超时时间。默认1秒,最小1秒。
successThreshold: 1 # 探测失败后,最少连续探测成功多少次才被认定为成功。默认是1
failureThreshold: 5 # 探测成功后,最少连续探测失败多少次才被认定为失败。默认是3
readinessProbe: # 就绪探针
enabled: true
path: /health # 心跳检测的接口,默认都是httpGet请求
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 5
\ No newline at end of file
......@@ -58,3 +58,21 @@ nodeSelector: {}
volumes:
hostPath:
path: /var/vcap/sys/run/docker/docker.sock
livenessProbe: # 存活探针
enabled: true
path: /health # 心跳检测的接口,默认都是httpGet请求
initialDelaySeconds: 5 # 容器启动后第一次执行探测是需要等待多少秒。
periodSeconds: 30 # 执行探测的频率。默认是10秒,最小1秒。
timeoutSeconds: 5 # 探测超时时间。默认1秒,最小1秒。
successThreshold: 1 # 探测失败后,最少连续探测成功多少次才被认定为成功。默认是1
failureThreshold: 5 # 探测成功后,最少连续探测失败多少次才被认定为失败。默认是3
readinessProbe: # 就绪探针
enabled: true
path: /health # 心跳检测的接口,默认都是httpGet请求
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 5
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment