Skip to content

feat(target-allocator): add extraEnvs support#2136

Merged
jaronoff97 merged 2 commits intoopen-telemetry:mainfrom
ilia-medvedev:feat/target-allocator-extra-envs
Apr 9, 2026
Merged

feat(target-allocator): add extraEnvs support#2136
jaronoff97 merged 2 commits intoopen-telemetry:mainfrom
ilia-medvedev:feat/target-allocator-extra-envs

Conversation

@ilia-medvedev
Copy link
Copy Markdown
Contributor

Summary

Adds extraEnvs support to the target-allocator Helm chart, allowing users to set arbitrary environment variables in the target allocator container. This follows the same pattern already established in the opentelemetry-collector chart.

Changes

  • Added targetAllocator.extraEnvs: [] field to values.yaml with examples
  • Updated _pod.tpl template to render extraEnvs after built-in OTELCOL_NAMESPACE env var
  • Added extraEnvs to values.schema.json for validation
  • Bumped chart version to 0.127.2 per contribution guidelines

Use Case

Users can now set environment variables like GOMEMLIMIT for memory management:

targetAllocator:
  extraEnvs:
    - name: GOMEMLIMIT
      value: "128MiB"

Or inject from secrets:

targetAllocator:
  extraEnvs:
    - name: API_KEY
      valueFrom:
        secretKeyRef:
          name: my-secret
          key: api-key

Testing

  • Helm lint passes
  • Chart templates render correctly with extraEnvs
  • Schema validation includes new field

Related

Closes #2098

Add extraEnvs field to targetAllocator in values.yaml and render it
in the _pod.tpl template after the existing OTELCOL_NAMESPACE env var.
Follows the same pattern used in the opentelemetry-collector chart.

This allows users to set arbitrary environment variables such as GOMEMLIMIT,
custom debugging flags, or application-specific configuration without needing
to modify chart templates directly.

Bump chart version to 0.127.2 per contribution guidelines.

Relates to: open-telemetry#2098

Signed-off-by: ilia-medvedev <ilia.medvedev@gong.io>
@ilia-medvedev ilia-medvedev requested a review from a team as a code owner April 5, 2026 06:47
Copy link
Copy Markdown
Contributor

@atoulme atoulme left a comment

Choose a reason for hiding this comment

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

LGTM

@jaronoff97 jaronoff97 merged commit 37e17fa into open-telemetry:main Apr 9, 2026
4 checks passed
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.

feat: add extraEnvs support to target-allocator chart

4 participants