Skip to content

Commit

Permalink
[sophora-server]: add flags to enable probes (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
hehu80 committed Jul 4, 2024
1 parent 16edc6b commit 0c01d83
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
30 changes: 15 additions & 15 deletions charts/sophora-server/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -282,35 +282,35 @@ spec:
- containerPort: 1199
name: rmi-registry
{{- end }}
{{- with .Values.livenessProbe }}
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: /status/liveness
port: 1196
failureThreshold: {{ .failureThreshold }}
initialDelaySeconds: {{ .initialDelaySeconds }}
periodSeconds: {{ .periodSeconds }}
timeoutSeconds: {{ .timeoutSeconds }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
{{- end }}
{{- with .Values.readinessProbe }}
{{- if .Values.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: /status/ready
port: 1196
failureThreshold: {{ .failureThreshold }}
initialDelaySeconds: {{ .initialDelaySeconds }}
periodSeconds: {{ .periodSeconds }}
timeoutSeconds: {{ .timeoutSeconds }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
{{- end }}
{{- with .Values.startupProbe }}
{{- if .Values.startupProbe.enabled }}
startupProbe:
httpGet:
path: /status/started
port: 1196
failureThreshold: {{ .failureThreshold }}
initialDelaySeconds: {{ .initialDelaySeconds }}
periodSeconds: {{ .periodSeconds }}
timeoutSeconds: {{ .timeoutSeconds }}
failureThreshold: {{ .Values.startupProbe.failureThreshold }}
initialDelaySeconds: {{ .Values.startupProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.startupProbe.periodSeconds }}
timeoutSeconds: {{ .Values.startupProbe.timeoutSeconds }}
{{- end }}
{{ if and .Values.sophora.server.isClusterServer .Values.preStop.enabled -}}
lifecycle:
Expand Down
3 changes: 3 additions & 0 deletions charts/sophora-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -272,18 +272,21 @@ configInitializer:
envFrom:

startupProbe:
enabled: true
failureThreshold: 35
initialDelaySeconds: 10
timeoutSeconds: 5
periodSeconds: 5

readinessProbe:
enabled: true
failureThreshold: 15
initialDelaySeconds: 30
timeoutSeconds: 5
periodSeconds: 15

livenessProbe:
enabled: true
failureThreshold: 3
initialDelaySeconds: 60
timeoutSeconds: 10
Expand Down

0 comments on commit 0c01d83

Please sign in to comment.