Skip to content

fix: prevent invalid YAML when zeebe exporter enabled without camunda…#4962

Open
dddpaul wants to merge 4 commits intocamunda:mainfrom
dddpaul:4961-fix-zeebe-exporter-yaml
Open

fix: prevent invalid YAML when zeebe exporter enabled without camunda…#4962
dddpaul wants to merge 4 commits intocamunda:mainfrom
dddpaul:4961-fix-zeebe-exporter-yaml

Conversation

@dddpaul
Copy link

@dddpaul dddpaul commented Jan 8, 2026

Closes #4961

Summary

  • Fix invalid YAML generation when orchestration.exporters.zeebe.enabled: true and orchestration.exporters.camunda.enabled: false
  • The else block outputting {} was incorrectly triggered even when the elasticsearch exporter had already been rendered
  • Added condition to only output {} when zeebe exporter is also disabled

Root Cause

In _application-unified.yaml, the else {} block at line 359 was paired with the camunda exporter if condition, not coordinated with the elasticsearch/opensearch exporter blocks. This caused {} to be appended after the elasticsearch config, producing invalid YAML:

numberOfReplicas: "1" {}

Fix

  -    {{- else -}}
  +    {{- else if not .Values.orchestration.exporters.zeebe.enabled -}}
         {{ " {}" }}

Test plan

  • Verified with helm template that the fix produces valid YAML
  • Unit tests pass

Verification command:

  cat << 'EOF' > /tmp/test-values.yaml
  global:
    security:
      authentication:
        method: basic
    elasticsearch:
      enabled: true
  elasticsearch:
    enabled: true
  identity:
    enabled: false
  identityPostgresql:
    enabled: false
  identityKeycloak:
    enabled: false
  optimize:
    enabled: false
  connectors:
    enabled: false
  orchestration:
    exporters:
      camunda:
        enabled: false
      zeebe:
        enabled: true
  EOF
  helm template camunda charts/camunda-platform-8.8 -f /tmp/test-values.yaml | grep -A12 "# zeebe.broker.exporters"

Expected output (no {} after numberOfReplicas):

          # zeebe.broker.exporters
          exporters:
            elasticsearch:
              className: "io.camunda.zeebe.exporter.ElasticsearchExporter"
              args:
                url: "http://camunda-elasticsearch:9200"
                index:
                  prefix: "zeebe-record"
                  numberOfReplicas: "1"

… exporter

The else block outputting {} was incorrectly triggered when the camunda
exporter was disabled, even if the zeebe/elasticsearch exporter had
already been rendered. This caused invalid YAML with {} appended after
the elasticsearch exporter config.

Closes camunda#4961
@dddpaul dddpaul requested a review from a team as a code owner January 8, 2026 11:50
@dddpaul dddpaul requested review from bkenez and removed request for a team January 8, 2026 11:50
@CLAassistant
Copy link

CLAassistant commented Jan 8, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added version/8.8 Camunda applications/cycle version component/orchestration labels Jan 8, 2026
@bkenez bkenez requested a review from hamza-m-masood January 13, 2026 11:17
@github-actions github-actions bot added the version/8.9 Camunda applications/cycle version label Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/orchestration version/8.8 Camunda applications/cycle version version/8.9 Camunda applications/cycle version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid YAML generated when zeebe exporter is enabled without camunda exporter

3 participants