From ea0af9a4cce07fa82ce734405dfc1b2267964021 Mon Sep 17 00:00:00 2001 From: majian Date: Tue, 23 Apr 2024 22:45:52 +0800 Subject: [PATCH] feat: add livenessProbe and readinessProbe to api, worker, frontend, and sandbox (#78) * add livenessProbe and readinessProbe to api, worker, frontend, and sandbox * bump version 0.3.2 --- charts/dify/Chart.yaml | 2 +- charts/dify/templates/deployment.yaml | 76 ++++++++++++++++++--------- 2 files changed, 53 insertions(+), 25 deletions(-) diff --git a/charts/dify/Chart.yaml b/charts/dify/Chart.yaml index 37011d7..6de45f6 100644 --- a/charts/dify/Chart.yaml +++ b/charts/dify/Chart.yaml @@ -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.2 +version: 0.3.3 # 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 diff --git a/charts/dify/templates/deployment.yaml b/charts/dify/templates/deployment.yaml index 13d9168..a9386cb 100644 --- a/charts/dify/templates/deployment.yaml +++ b/charts/dify/templates/deployment.yaml @@ -72,14 +72,24 @@ spec: - name: http containerPort: {{ .Values.api.containerPort }} protocol: TCP - # livenessProbe: - # httpGet: - # path: / - # port: http - # readinessProbe: - # httpGet: - # path: / - # port: http + 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 resources: {{- toYaml .Values.api.resources | nindent 12 }} {{- with .Values.volumes }} @@ -227,14 +237,24 @@ spec: - name: http containerPort: {{ .Values.frontend.containerPort }} protocol: TCP - # livenessProbe: - # httpGet: - # path: / - # port: http - # readinessProbe: - # httpGet: - # path: / - # port: http + livenessProbe: + httpGet: + path: /apps + port: http + initialDelaySeconds: 30 + timeoutSeconds: 5 + periodSeconds: 30 + successThreshold: 1 + failureThreshold: 2 + readinessProbe: + httpGet: + path: /apps + port: http + initialDelaySeconds: 1 + timeoutSeconds: 5 + periodSeconds: 5 + successThreshold: 1 + failureThreshold: 10 resources: {{- toYaml .Values.frontend.resources | nindent 12 }} {{- with .Values.frontend.nodeSelector }} @@ -311,14 +331,22 @@ spec: - name: http containerPort: {{ .Values.sandbox.containerPort }} protocol: TCP - # livenessProbe: - # httpGet: - # path: / - # port: http - # readinessProbe: - # httpGet: - # path: / - # port: http + livenessProbe: + tcpSocket: + port: http + initialDelaySeconds: 30 + timeoutSeconds: 5 + periodSeconds: 30 + successThreshold: 1 + failureThreshold: 2 + readinessProbe: + tcpSocket: + port: http + initialDelaySeconds: 1 + timeoutSeconds: 5 + periodSeconds: 5 + successThreshold: 1 + failureThreshold: 10 resources: {{- toYaml .Values.sandbox.resources | nindent 12 }} {{- with .Values.sandbox.nodeSelector }}