diff --git a/deploy/charts/emqx/templates/StatefulSet.yaml b/deploy/charts/emqx/templates/StatefulSet.yaml index d593cefb9..992528bbe 100644 --- a/deploy/charts/emqx/templates/StatefulSet.yaml +++ b/deploy/charts/emqx/templates/StatefulSet.yaml @@ -205,8 +205,23 @@ spec: httpGet: path: /status port: {{ .Values.emqxConfig.EMQX_MANAGEMENT__LISTENER__HTTP | default 8081 }} - initialDelaySeconds: 5 + initialDelaySeconds: 10 periodSeconds: 5 + failureThreshold: 30 + livenessProbe: + httpGet: + path: /status + port: {{ .Values.emqxConfig.EMQX_MANAGEMENT__LISTENER__HTTP | default 8081 }} + initialDelaySeconds: 60 + periodSeconds: 30 + failureThreshold: 10 + lifecycle: + preStop: + exec: + command: + - "/opt/emqx/bin/emqx_ctl" + - "cluster" + - "leave" {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }}