From f01c740f3289e6259e2e19167df3a246469a8ea7 Mon Sep 17 00:00:00 2001 From: Abdallah Serghine Date: Tue, 7 Jan 2025 19:01:27 +0100 Subject: [PATCH] ISSUE-304: allow running search reindexing fully with cronjob Allow running elastic search reindexing fully from the cronjob process, this will mitigate potential issues with the server being affected when issues happen there, example OOMs, or issues on the search server side. --- charts/openmetadata/templates/cron-reindex.yaml | 4 ++-- charts/openmetadata/values.schema.json | 7 +++++++ charts/openmetadata/values.yaml | 4 ++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/charts/openmetadata/templates/cron-reindex.yaml b/charts/openmetadata/templates/cron-reindex.yaml index df9798a..f3fb02a 100644 --- a/charts/openmetadata/templates/cron-reindex.yaml +++ b/charts/openmetadata/templates/cron-reindex.yaml @@ -9,7 +9,7 @@ metadata: {{- toYaml . | nindent 8 }} {{- end }} spec: - suspend: true + suspend: {{ .Values.openmetadata.config.reindexConfig.suspend }} failedJobsHistoryLimit: 1 successfulJobsHistoryLimit: 1 jobTemplate: @@ -126,4 +126,4 @@ spec: {{- toYaml . | nindent 12 }} {{- end }} restartPolicy: OnFailure - schedule: "0/5 * * * *" + schedule: {{ .Values.openmetadata.config.reindexConfig.schedule }} diff --git a/charts/openmetadata/values.schema.json b/charts/openmetadata/values.schema.json index 6b824f1..0317d8d 100644 --- a/charts/openmetadata/values.schema.json +++ b/charts/openmetadata/values.schema.json @@ -188,6 +188,13 @@ }, "debug": { "type": "boolean" + }, + "schedule": { + "type": "string" + }, + "suspend": { + "type": "boolean", + "default": true } } }, diff --git a/charts/openmetadata/values.yaml b/charts/openmetadata/values.yaml index 0d6d354..15bdad7 100644 --- a/charts/openmetadata/values.yaml +++ b/charts/openmetadata/values.yaml @@ -14,11 +14,15 @@ openmetadata: additionalArgs: "" deployPipelinesConfig: debug: false + # You can pass the additional argument flags to the openmetadata-ops.sh reindex command additionalArgs: "" reindexConfig: debug: false + # You can choose whether to run the job on demand or on schedule. + suspend: true # You can pass the additional argument flags to the openmetadata-ops.sh reindex command additionalArgs: "" + schedule: "0/5 * * * *" # Values can be OFF, ERROR, WARN, INFO, DEBUG, TRACE, or ALL logLevel: INFO clusterName: openmetadata