diff --git a/charts/apisix/templates/deployment.yaml b/charts/apisix/templates/deployment.yaml index acda6be7..30a14c39 100644 --- a/charts/apisix/templates/deployment.yaml +++ b/charts/apisix/templates/deployment.yaml @@ -175,6 +175,16 @@ spec: port: {{ .Values.service.http.containerPort }} {{- end}} timeoutSeconds: 1 + {{- if .Values.apisix.deployment.livenessProbe.enabled }} + livenessProbe: + tcpSocket: + port: {{ .Values.service.http.containerPort }} + initialDelaySeconds: {{ .Values.apisix.deployment.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.apisix.deployment.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.apisix.deployment.livenessProbe.timeoutSeconds }} + failureThreshold: {{ .Values.apisix.deployment.livenessProbe.failureThreshold }} + successThreshold: {{ .Values.apisix.deployment.livenessProbe.successThreshold }} + {{- end}} {{- end }} lifecycle: preStop: diff --git a/charts/apisix/values.yaml b/charts/apisix/values.yaml index 74aec6ae..ed0edbd8 100644 --- a/charts/apisix/values.yaml +++ b/charts/apisix/values.yaml @@ -346,6 +346,13 @@ apisix: # ref: https://apisix.apache.org/docs/apisix/deployment-modes/ mode: traditional + livenessProbe: + enabled: false + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 6 + successThreshold: 1 # -- Deployment role # Optional: traditional, data_plane, control_plane #