Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make livenessprobe and readnessprobe configurable #80

Merged
merged 2 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/dify/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.3.3
version: 0.3.4

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
78 changes: 26 additions & 52 deletions charts/dify/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,14 @@ spec:
- name: http
containerPort: {{ .Values.api.containerPort }}
protocol: TCP
{{- with .Values.api.livenessProbe }}
livenessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 30
timeoutSeconds: 5
periodSeconds: 30
successThreshold: 1
failureThreshold: 2
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.api.readinessProbe }}
readinessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 10
timeoutSeconds: 5
periodSeconds: 5
successThreshold: 1
failureThreshold: 10
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.api.resources | nindent 12 }}
{{- with .Values.volumes }}
Expand Down Expand Up @@ -166,6 +156,14 @@ spec:
volumeMounts:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.worker.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.worker.readinessProbe }}
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.worker.resources | nindent 12 }}
{{- with .Values.volumes }}
Expand Down Expand Up @@ -237,30 +235,14 @@ spec:
- name: http
containerPort: {{ .Values.frontend.containerPort }}
protocol: TCP
{{- with .Values.frontend.livenessProbe }}
livenessProbe:
httpGet:
path: /apps
port: http
httpHeaders:
- name: accept-language
value: en
initialDelaySeconds: 30
timeoutSeconds: 5
periodSeconds: 30
successThreshold: 1
failureThreshold: 2
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.frontend.readinessProbe}}
readinessProbe:
httpGet:
path: /apps
port: http
httpHeaders:
- name: accept-language
value: en
initialDelaySeconds: 30
timeoutSeconds: 5
periodSeconds: 5
successThreshold: 1
failureThreshold: 10
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.frontend.resources | nindent 12 }}
{{- with .Values.frontend.nodeSelector }}
Expand Down Expand Up @@ -337,22 +319,14 @@ spec:
- name: http
containerPort: {{ .Values.sandbox.containerPort }}
protocol: TCP
{{- with .Values.sandbox.livenessProbe }}
livenessProbe:
tcpSocket:
port: http
initialDelaySeconds: 30
timeoutSeconds: 5
periodSeconds: 30
successThreshold: 1
failureThreshold: 2
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.sandbox.readinessProbe}}
readinessProbe:
tcpSocket:
port: http
initialDelaySeconds: 1
timeoutSeconds: 5
periodSeconds: 5
successThreshold: 1
failureThreshold: 10
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.sandbox.resources | nindent 12 }}
{{- with .Values.sandbox.nodeSelector }}
Expand Down
66 changes: 66 additions & 0 deletions charts/dify/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,31 @@ frontend:
tolerations: []

affinity: {}
livenessProbe:
httpGet:
path: /apps
port: http
httpHeaders:
- name: accept-language
value: en
initialDelaySeconds: 3
timeoutSeconds: 5
periodSeconds: 30
successThreshold: 1
failureThreshold: 2
readinessProbe:
httpGet:
path: /apps
port: http
httpHeaders:
- name: accept-language
value: en
initialDelaySeconds: 3
timeoutSeconds: 5
periodSeconds: 30
successThreshold: 1
failureThreshold: 2


api:
replicaCount: 1
Expand Down Expand Up @@ -184,6 +209,25 @@ api:

affinity: {}

livenessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 30
timeoutSeconds: 5
periodSeconds: 30
successThreshold: 1
failureThreshold: 2
readinessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 10
timeoutSeconds: 5
periodSeconds: 5
successThreshold: 1
failureThreshold: 10

worker:
replicaCount: 1

Expand Down Expand Up @@ -234,6 +278,10 @@ worker:

affinity: {}

# livenessprobe for worker, default no probe
livenessProbe: {}
readinessProbe: {}

sandbox:
replicaCount: 1
# please change to avoid abuse
Expand Down Expand Up @@ -298,6 +346,24 @@ sandbox:

affinity: {}


readinessProbe:
tcpSocket:
port: http
initialDelaySeconds: 1
timeoutSeconds: 5
periodSeconds: 5
successThreshold: 1
failureThreshold: 10
livenessProbe:
tcpSocket:
port: http
initialDelaySeconds: 30
timeoutSeconds: 5
periodSeconds: 30
successThreshold: 1
failureThreshold: 2

##### dependencies #####

redis:
Expand Down
Loading