Skip to content

[TASK] Add Dedicated opensearch.prefix Support for Camunda Helm Charts #3378

Open
camunda/camunda-docs
#5658
@drodriguez-305

Description

@drodriguez-305

Related to

Opensearch and Elasticsearch Index Prefix Configuration

Overview

Add support for a dedicated global.opensearch.prefix configuration value in the Camunda Helm charts for versions 8.5 - 8.7. Currently, only the global.elasticsearch.prefix is exposed, while OpenSearch deployments require a similar mechanism for customizing index prefixes. This task aims to mirror the Elasticsearch behavior but for OpenSearch and ensure that all related components (Zeebe, Operate, Tasklist, Optimize) correctly use the new configuration. The implementation should not affect users using Elasticsearch while providing a migration path and warnings for OpenSearch users relying on incorrect or legacy configurations. (mentioned here)

Actions

  • Introduce a new Helm value global.opensearch.prefix to allow custom index prefixes for OpenSearch.
  • Update Helm charts/templates to inject the new prefix into the Zeebe broker’s configuration (config map and environment variables) when OpenSearch is enabled.
  • Update components (Operate, Tasklist, Optimize) configurations to use the new prefix.
  • Provide fallback logic and a warning message if OpenSearch is enabled but users have been using global.elasticsearch.prefix.
  • Document the changes

Sub-tasks

  • Analyze Current Behavior

    • Confirm that only global.elasticsearch.prefix is exposed in 8.5-8.7.
    • Review existing Zeebe exporter configuration for OpenSearch (e.g., environment variable ZEEBE_BROKER_EXPORTERS_OPENSEARCH_ARGS_INDEX_PREFIX).
  • Define OpenSearch Prefix Requirements

    • Determine desired behavior when global.opensearch.prefix is provided versus not provided.
    • Decide on fallback and warning behavior if global.elasticsearch.prefix is used when OpenSearch is enabled.
  • Update Helm Chart Values

    • Add new fields in values.yaml for supported versions:
      global:
        opensearch:
          enabled: false   # or true based on deployment needs
          prefix: ""       # custom index prefix for OpenSearch
    • Update chart documentation to reflect the new value.
  • Update Zeebe Configuration Templates

    • Modify the ConfigMap template for Zeebe:
      • Inject global.opensearch.prefix into the exporter configuration when OpenSearch is enabled.
      • Example snippet:
        {{- if .Values.global.opensearch.enabled }}
        exporters:
          opensearch:
            className: "io.camunda.zeebe.exporter.opensearch.OpensearchExporter"
            args:
              url: "{{ .Values.global.opensearch.url }}"
              index:
                prefix: "{{ .Values.global.opensearch.prefix }}"
              {{- end }}
    • Ensure that if necessary, the environment variable ZEEBE_BROKER_EXPORTERS_OPENSEARCH_ARGS_INDEX_PREFIX is set with the provided prefix.
  • Update Component Configurations

    • Update Operate, Tasklist, and Optimize ConfigMaps to conditionally use global.opensearch.prefix when OpenSearch is enabled.
  • Implement Fallback/Warning Logic (Optional)

    • If OpenSearch is enabled but global.elasticsearch.prefix is set, log a warning or emit a deprecation message recommending the use of global.opensearch.prefix.
  • Testing and Verification

    • Run Helm template commands (helm template) for 8.6 and 8.7 with different configurations:
      • OpenSearch enabled with a custom prefix.
      • OpenSearch enabled without a custom prefix.
      • Elasticsearch mode to ensure no unintended changes.
    • Integration Test + Unit Test:
      • The Zeebe broker creates indices with the custom prefix.
      • Operate/Tasklist/Optimize successfully read from these indices.
    • Verify backward compatibility for users who might be using legacy configurations.
  • Documentation and Communication

    • Update Helm chart README and Camunda documentation to explain the new global.opensearch.prefix option.
    • Add examples in docs for configuring OpenSearch with a custom index prefix.
    • Prepare release notes and an upgrade/migration guide if necessary.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions