Skip to content

Omit Elasticsearch cluster settings#901

Merged
stuart-wells merged 5 commits intomainfrom
stuartwells/skippingclustersettings
Apr 29, 2026
Merged

Omit Elasticsearch cluster settings#901
stuart-wells merged 5 commits intomainfrom
stuartwells/skippingclustersettings

Conversation

@stuart-wells
Copy link
Copy Markdown
Contributor

@stuart-wells stuart-wells commented Apr 27, 2026

#896

Omitting Elasticsearch cluster settings

What was changed

auto_create_index: false can cause issues for shared Elasticsearch clusters. This is the only setting in https://github.com/temporalio/temporal/blob/main/schema/elasticsearch/visibility/cluster_settings_v7.json , so applying these settings is now being omitted.

Why?

From the issue "This disables auto-creation of indices cluster-wide, which is problematic when Elasticsearch is shared with other services that rely on automatic index creation."

Checklist

  1. Closes [Feature Request] Support skipping cluster settings when managing Elasticsearch schema #896

  2. How was this tested:

  • Checked helm template results
  • Ran local kind cluster and verified elasticsearch auto_create_index was no longer overwritten.
  1. Any docs updates needed?
    No

stuart-wells added 2 commits April 27, 2026 13:59
#896

Option to skip cluster settings when using a shared
Elasticsearch cluster
@stuart-wells stuart-wells requested a review from a team as a code owner April 27, 2026 21:38
Copy link
Copy Markdown
Contributor

@robholland robholland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having looked at the cluster settings (https://github.com/temporalio/temporal/blob/main/schema/elasticsearch/visibility/cluster_settings_v7.json) it's only the one setting, and we don't need that in helm as we enforce ordering via hooks so that the index is created before it gets used by the service. Let's just omit the cluster settings unconditionally. I think elasticsearch-tool update-schema without --index will create the template if it doesn't exist.

{{- end }}
{{- else if eq $store.driver "elasticsearch" }}
{{- if $store.config.skipClusterSettings }}
- temporal-elasticsearch-tool create-index && temporal-elasticsearch-tool update-schema --index "$ES_VISIBILITY_INDEX"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't quite right, if we create-index without the template being there then the index will lack the proper settings/mappings.

Copy link
Copy Markdown
Contributor

@robholland robholland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the PR description before merging.

- equal:
path: spec.template.spec.initContainers[?(@.name=="manage-schema-default-store")].env[?(@.name=="SQL_PORT")].value
value: "5432"
- it: does not use setup-schema for elasticsearch
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the right layer to test this, you can drop the tests.

@stuart-wells stuart-wells changed the title Option to skip cluster setting w/ Elasticsearch Omit Elasticsearch cluster settings Apr 29, 2026
@stuart-wells stuart-wells merged commit bbc5d30 into main Apr 29, 2026
4 checks passed
@stuart-wells stuart-wells deleted the stuartwells/skippingclustersettings branch April 29, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Support skipping cluster settings when managing Elasticsearch schema

2 participants