diff --git a/charts/quickwit/templates/_helpers.tpl b/charts/quickwit/templates/_helpers.tpl index 40c0ad1..20b9b1a 100644 --- a/charts/quickwit/templates/_helpers.tpl +++ b/charts/quickwit/templates/_helpers.tpl @@ -153,7 +153,7 @@ Quickwit environment - name: QW_ADVERTISE_ADDRESS value: "$(POD_IP)" - name: QW_CLUSTER_ENDPOINT - value: http://{{ include "quickwit.fullname" $ }}-metastore.{{ $.Release.Namespace }}.svc.cluster.local:7280 + value: http://{{ include "quickwit.fullname" $ }}-metastore.{{ $.Release.Namespace }}.svc.{{ .Values.clusterDomain }}:7280 {{- range $key, $value := .Values.environment }} - name: "{{ $key }}" value: "{{ $value }}" diff --git a/charts/quickwit/templates/control-plane-deployment.yaml b/charts/quickwit/templates/control-plane-deployment.yaml index f7689f1..ec106f8 100644 --- a/charts/quickwit/templates/control-plane-deployment.yaml +++ b/charts/quickwit/templates/control-plane-deployment.yaml @@ -122,3 +122,6 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.control_plane.runtimeClassName }} + runtimeClassName: {{ .Values.control_plane.runtimeClassName | quote }} + {{- end }} diff --git a/charts/quickwit/templates/indexer-statefulset.yaml b/charts/quickwit/templates/indexer-statefulset.yaml index 7925567..d3adb76 100644 --- a/charts/quickwit/templates/indexer-statefulset.yaml +++ b/charts/quickwit/templates/indexer-statefulset.yaml @@ -14,7 +14,7 @@ metadata: spec: replicas: {{ .Values.indexer.replicaCount }} serviceName: {{ include "quickwit.fullname" . }}-headless - {{- if .Values.searcher.podManagementPolicy }} + {{- if .Values.indexer.podManagementPolicy }} podManagementPolicy: {{ .Values.indexer.podManagementPolicy }} {{- end }} selector: @@ -96,6 +96,11 @@ spec: {{- end }} resources: {{- toYaml .Values.indexer.resources | nindent 12 }} + {{- if .Values.indexer.lifecycleHooks }} + lifecycle: + {{- toYaml .Values.indexer.lifecycleHooks | nindent 12 }} + {{- end }} + terminationGracePeriodSeconds: {{ .Values.indexer.terminationGracePeriodSeconds }} volumes: - name: config configMap: @@ -127,6 +132,9 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.indexer.runtimeClassName }} + runtimeClassName: {{ .Values.indexer.runtimeClassName | quote }} + {{- end }} {{- if .Values.indexer.persistentVolume.enabled }} volumeClaimTemplates: - metadata: diff --git a/charts/quickwit/templates/janitor-deployment.yaml b/charts/quickwit/templates/janitor-deployment.yaml index 6fb5dc9..28e766f 100644 --- a/charts/quickwit/templates/janitor-deployment.yaml +++ b/charts/quickwit/templates/janitor-deployment.yaml @@ -4,7 +4,7 @@ kind: Deployment metadata: name: {{ include "quickwit.fullname" . }}-janitor labels: - {{- include "quickwit.labels" . | nindent 4 }} + {{- include "quickwit.labels" . | nindent 4 }} annotations: {{- with .Values.annotations }} {{- toYaml . | nindent 4 }} @@ -122,4 +122,7 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} -{{- end }} + {{- if .Values.janitor.runtimeClassName }} + runtimeClassName: {{ .Values.janitor.runtimeClassName | quote }} + {{- end }} +{{- end }} diff --git a/charts/quickwit/templates/job-create-indices.yaml b/charts/quickwit/templates/job-create-indices.yaml index 13fd304..fa800f4 100644 --- a/charts/quickwit/templates/job-create-indices.yaml +++ b/charts/quickwit/templates/job-create-indices.yaml @@ -98,5 +98,8 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if $.Values.bootstrap.runtimeClassName }} + runtimeClassName: {{ $.Values.bootstrap.runtimeClassName | quote }} + {{- end }} {{- end }} {{- end }} diff --git a/charts/quickwit/templates/job-create-sources.yaml b/charts/quickwit/templates/job-create-sources.yaml index e10848a..46cc056 100644 --- a/charts/quickwit/templates/job-create-sources.yaml +++ b/charts/quickwit/templates/job-create-sources.yaml @@ -100,5 +100,8 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if $.Values.bootstrap.runtimeClassName }} + runtimeClassName: {{ $.Values.bootstrap.runtimeClassName | quote }} + {{- end }} {{- end }} {{- end }} diff --git a/charts/quickwit/templates/metastore-deployment.yaml b/charts/quickwit/templates/metastore-deployment.yaml index 80b461d..b4eb4dc 100644 --- a/charts/quickwit/templates/metastore-deployment.yaml +++ b/charts/quickwit/templates/metastore-deployment.yaml @@ -120,3 +120,6 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.metastore.runtimeClassName }} + runtimeClassName: {{ .Values.metastore.runtimeClassName | quote }} + {{- end }} diff --git a/charts/quickwit/templates/searcher-statefulset.yaml b/charts/quickwit/templates/searcher-statefulset.yaml index 0677b33..febe512 100644 --- a/charts/quickwit/templates/searcher-statefulset.yaml +++ b/charts/quickwit/templates/searcher-statefulset.yaml @@ -96,6 +96,10 @@ spec: {{- end }} resources: {{- toYaml .Values.searcher.resources | nindent 14 }} + {{- if .Values.searcher.lifecycleHooks }} + lifecycle: + {{- toYaml .Values.searcher.lifecycleHooks | nindent 14 }} + {{- end }} volumes: - name: config configMap: @@ -127,6 +131,9 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.searcher.runtimeClassName }} + runtimeClassName: {{ .Values.searcher.runtimeClassName | quote }} + {{- end }} {{- if .Values.searcher.persistentVolume.enabled }} volumeClaimTemplates: - metadata: diff --git a/charts/quickwit/values.yaml b/charts/quickwit/values.yaml index 3da863f..2b63435 100644 --- a/charts/quickwit/values.yaml +++ b/charts/quickwit/values.yaml @@ -12,6 +12,9 @@ imagePullSecrets: [] nameOverride: "" fullnameOverride: "" +# Set the Kuberentes cluster domain if not default. It's used to build URLs for the services. +clusterDomain: cluster.local + # -- Additional labels to add to all resources additionalLabels: {} # app: quickwit @@ -105,6 +108,19 @@ searcher: path: /health/readyz port: rest + # StatefulSet allows you to relax its ordering guarantees + # - OrderedReady + # - Parallel + podManagementPolicy: OrderedReady + + lifecycleHooks: {} + # preStop: + # exec: + # command: + # - /bin/sh + # - -c + # - sleep 30 + # Override args for starting container args: [] @@ -125,6 +141,8 @@ searcher: affinity: {} + runtimeClassName: "" + indexer: replicaCount: 1 @@ -176,6 +194,11 @@ indexer: path: /health/readyz port: rest + # StatefulSet allows you to relax its ordering guarantees + # - OrderedReady + # - Parallel + podManagementPolicy: OrderedReady + # Override args for starting container args: [] @@ -196,6 +219,20 @@ 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 + + runtimeClassName: "" + persistentVolume: enabled: false # storage: "1Gi" @@ -268,6 +305,8 @@ metastore: affinity: {} + runtimeClassName: "" + control_plane: # Extra env for control plane extraEnv: {} @@ -329,6 +368,8 @@ control_plane: affinity: {} + runtimeClassName: "" + janitor: # Enable Janitor service enabled: true @@ -393,6 +434,8 @@ janitor: affinity: {} + runtimeClassName: "" + # Deploy jobs to bootstrap creation of indexes and sources for quickwit clusters bootstrap: # Enable bootstrap jobs @@ -421,6 +464,8 @@ bootstrap: affinity: {} + runtimeClassName: "" + sources: # Override command for starting container command: []