From d7aefc41106fd30ed5f6971c34cf74ac2238ef6a Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Sat, 25 Oct 2025 13:57:56 +0200 Subject: [PATCH] k8s: disable index creation job --- .../templates/quickwit-index-configmap.yaml | 34 -------- .../templates/quickwit-index-job.yaml | 78 ------------------- k8s/papercrate/values.yaml | 10 --- 3 files changed, 122 deletions(-) delete mode 100644 k8s/papercrate/templates/quickwit-index-configmap.yaml delete mode 100644 k8s/papercrate/templates/quickwit-index-job.yaml diff --git a/k8s/papercrate/templates/quickwit-index-configmap.yaml b/k8s/papercrate/templates/quickwit-index-configmap.yaml deleted file mode 100644 index 99475c1..0000000 --- a/k8s/papercrate/templates/quickwit-index-configmap.yaml +++ /dev/null @@ -1,34 +0,0 @@ -{{- if and .Values.quickwit.enabled .Values.quickwit.indexJob.enabled .Values.quickwit.indexJob.indexConfig.create }} -{{- $cfg := .Values.quickwit.indexJob.indexConfig -}} -{{- $config := dict "value" "" -}} -{{- if $cfg.file }} - {{- with $.Files.Get $cfg.file -}} - {{- $_ := set $config "value" . -}} - {{- end -}} -{{- end -}} -{{- if and (not (index $config "value")) $cfg.contents }} - {{- $_ := set $config "value" $cfg.contents -}} -{{- end -}} -{{- if eq (trim (default "" (index $config "value"))) "" -}} - {{- fail "Quickwit index configuration requires either indexConfig.file or indexConfig.contents" -}} -{{- end }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "papercrate.fullname" . }}-quickwit-index - labels: - {{- include "papercrate.labels" . | nindent 4 }} - app.kubernetes.io/component: quickwit - app.kubernetes.io/part-of: quickwit-index -data: - {{ $cfg.key }}: | -{{ index $config "value" | indent 4 }} -{{- $ctx := dict "storageUri" (.Values.quickwit.env.storageUri | default "") -}} -{{- if and (eq (index $ctx "storageUri") "") .Values.global.s3.bucket -}} -{{- $_ := set $ctx "storageUri" (printf "s3://%s/quickwit" .Values.global.s3.bucket) -}} -{{- end -}} -{{- $storageUri := index $ctx "storageUri" -}} -{{- if $storageUri }} -{{ printf "index_uri: %s/documents" (trimSuffix "/" $storageUri) | indent 4 }} -{{- end }} -{{- end }} diff --git a/k8s/papercrate/templates/quickwit-index-job.yaml b/k8s/papercrate/templates/quickwit-index-job.yaml deleted file mode 100644 index 3a09393..0000000 --- a/k8s/papercrate/templates/quickwit-index-job.yaml +++ /dev/null @@ -1,78 +0,0 @@ -{{- if and .Values.quickwit.enabled .Values.quickwit.indexJob.enabled }} -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ include "papercrate.fullname" . }}-quickwit-index - labels: - {{- include "papercrate.labels" . | nindent 4 }} - app.kubernetes.io/component: quickwit-index - annotations: - "helm.sh/hook": post-install,post-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded -spec: - backoffLimit: {{ .Values.quickwit.indexJob.backoffLimit }} - template: - metadata: - labels: - {{- include "papercrate.selectorLabels" . | nindent 8 }} - app.kubernetes.io/component: quickwit-index - spec: - restartPolicy: Never - {{- if or .Values.global.imagePullSecrets .Values.imagePullSecrets }} - imagePullSecrets: - {{- range .Values.global.imagePullSecrets }} - - name: {{ . }} - {{- end }} - {{- range .Values.imagePullSecrets }} - - name: {{ . }} - {{- end }} - {{- end }} - {{- $qw := dict "storageUri" .Values.quickwit.env.storageUri "metastoreUri" .Values.quickwit.env.metastoreUri -}} - {{- if and (not (index $qw "storageUri")) .Values.global.s3.bucket -}} - {{- $_ := set $qw "storageUri" (printf "s3://%s/quickwit" .Values.global.s3.bucket) -}} - {{- end -}} - {{- if not (index $qw "storageUri") -}} - {{- fail "quickwit.env.storageUri must be set, or provide global.s3.bucket" -}} - {{- end -}} - {{- if and (not (index $qw "metastoreUri")) .Values.postgres.enabled -}} - {{- $dbUser := required "postgres.auth.username is required when postgres.enabled" .Values.postgres.auth.username -}} - {{- $dbPass := required "postgres.auth.password is required when postgres.enabled" .Values.postgres.auth.password -}} - {{- $dbHost := printf "%s-postgres" (include "papercrate.fullname" .) -}} - {{- $_ := set $qw "metastoreUri" (printf "postgres://%s:%s@%s:5432/quickwit" $dbUser $dbPass $dbHost) -}} - {{- end -}} - {{- if not (index $qw "metastoreUri") -}} - {{- fail "quickwit.env.metastoreUri must be set when not using bundled Postgres" -}} - {{- end }} - containers: - - name: quickwit-index - image: {{ include "papercrate.quickwit.image" . }}:{{ include "papercrate.image.tag" (dict "image" .Values.quickwit.image "Chart" .Chart) }} - imagePullPolicy: {{ .Values.quickwit.image.pullPolicy }} - command: - - quickwit - - index - - create - args: - - --index-config=/config/{{ .Values.quickwit.indexJob.indexConfig.key }} - - --endpoint=http://{{ include "papercrate.fullname" . }}-quickwit:{{ .Values.quickwit.service.port }} - {{- if or .Values.quickwit.envFrom .Values.global.s3.credentialsSecret }} - envFrom: - {{- with .Values.global.s3.credentialsSecret }} - - secretRef: - name: {{ . }} - {{- end }} - {{- range .Values.quickwit.envFrom }} - - {{ toYaml . | nindent 12 | trim }} - {{- end }} - {{- end }} - {{- if or .Values.quickwit.indexJob.indexConfig.existingConfigMap .Values.quickwit.indexJob.indexConfig.create }} - volumeMounts: - - name: index-config - mountPath: /config - {{- end }} - {{- if or .Values.quickwit.indexJob.indexConfig.existingConfigMap .Values.quickwit.indexJob.indexConfig.create }} - volumes: - - name: index-config - configMap: - name: {{ if .Values.quickwit.indexJob.indexConfig.existingConfigMap }}{{ .Values.quickwit.indexJob.indexConfig.existingConfigMap }}{{ else }}{{ include "papercrate.fullname" . }}-quickwit-index{{ end }} - {{- end }} -{{- end }} diff --git a/k8s/papercrate/values.yaml b/k8s/papercrate/values.yaml index 3c798a8..7999233 100644 --- a/k8s/papercrate/values.yaml +++ b/k8s/papercrate/values.yaml @@ -141,16 +141,6 @@ quickwit: nodeSelector: {} tolerations: [] affinity: {} - indexJob: - enabled: true - backoffLimit: 3 - indexConfig: - existingConfigMap: "" - key: documents-index.yaml - create: true - file: files/quickwit/documents-index.yaml - contents: "" - imagePullSecrets: [] nameOverride: "" fullnameOverride: ""