From 0f2813a0f1a7603ba624a83b1a321c920436904f Mon Sep 17 00:00:00 2001 From: Fred Marques Date: Sat, 5 Oct 2024 17:48:52 +0100 Subject: [PATCH] Introducing pod lifecycle --- charts/quickwit/templates/indexer-statefulset.yaml | 4 ++++ charts/quickwit/templates/searcher-statefulset.yaml | 4 ++++ charts/quickwit/values.yaml | 10 ++++++++++ 3 files changed, 18 insertions(+) diff --git a/charts/quickwit/templates/indexer-statefulset.yaml b/charts/quickwit/templates/indexer-statefulset.yaml index 52b1e09..64ea0cb 100644 --- a/charts/quickwit/templates/indexer-statefulset.yaml +++ b/charts/quickwit/templates/indexer-statefulset.yaml @@ -128,6 +128,10 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.indexer.lifecycle }} + lifecycle: + {{- toYaml . | nindent 8 }} + {{- end}} {{- if .Values.indexer.persistentVolume.enabled }} volumeClaimTemplates: - metadata: diff --git a/charts/quickwit/templates/searcher-statefulset.yaml b/charts/quickwit/templates/searcher-statefulset.yaml index 0677b33..3eada6e 100644 --- a/charts/quickwit/templates/searcher-statefulset.yaml +++ b/charts/quickwit/templates/searcher-statefulset.yaml @@ -127,6 +127,10 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.indexer.lifecycle }} + lifecycle: + {{- toYaml . | nindent 8 }} + {{- end}} {{- if .Values.searcher.persistentVolume.enabled }} volumeClaimTemplates: - metadata: diff --git a/charts/quickwit/values.yaml b/charts/quickwit/values.yaml index d27b912..dfbf6e1 100644 --- a/charts/quickwit/values.yaml +++ b/charts/quickwit/values.yaml @@ -105,6 +105,8 @@ searcher: path: /health/readyz port: rest + lifecycleHooks: {} + # Override args for starting container args: [] @@ -196,6 +198,14 @@ indexer: affinity: {} + lifecycleHooks: {} + # preStop: + # exec: + # command: + # - /bin/sh + # - -c + # - sleep 30 + # Long grace period is recommended to wait for all index commit_timeout_secs and splits to be published # See https://quickwit.io/docs/configuration/index-config#indexing-settings terminationGracePeriodSeconds: 120