Skip to content

Include clusterName sha in OBI annotation#2214

Open
MrAlias wants to merge 10 commits intosignalfx:mainfrom
MrAlias:obi-cluster-name-restart
Open

Include clusterName sha in OBI annotation#2214
MrAlias wants to merge 10 commits intosignalfx:mainfrom
MrAlias:obi-cluster-name-restart

Conversation

@MrAlias
Copy link
Contributor

@MrAlias MrAlias commented Jan 23, 2026

@MrAlias MrAlias force-pushed the obi-cluster-name-restart branch from 448ed5b to a95f867 Compare January 23, 2026 15:47
@MrAlias MrAlias marked this pull request as ready for review January 23, 2026 17:12
@MrAlias MrAlias requested review from a team as code owners January 23, 2026 17:12
Copilot AI review requested due to automatic review settings January 23, 2026 17:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR attempts to implement automatic pod restarts for OBI (OpenTelemetry eBPF Instrumentation) when the cluster name ConfigMap changes. It upgrades the OBI subchart from v0.3.0 to v0.4.3 to leverage new template expression support in pod annotations.

Changes:

  • Upgraded OBI subchart dependency from version 0.3.0 to 0.4.3
  • Added a checksum/obi-env pod annotation to trigger OBI pod restarts when the ConfigMap changes
  • Added changelog entry documenting the enhancement

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
helm-charts/splunk-otel-collector/Chart.yaml Bumps OBI chart version from 0.3.0 to 0.4.3
helm-charts/splunk-otel-collector/values.yaml Adds pod annotation with checksum calculation to detect ConfigMap changes
.chloggen/obi-cluster-name-restart.yaml Documents the enhancement and new functionality

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings January 23, 2026 21:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings January 26, 2026 15:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MrAlias MrAlias changed the title Include obi-env configmap sha in OBI annotation Include clusterName sha in OBI annotation Jan 26, 2026
@jinja2
Copy link
Collaborator

jinja2 commented Jan 30, 2026

@MrAlias can you run make render to update the examples?

Copilot AI review requested due to automatic review settings January 30, 2026 19:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

# Automatically restart OBI pods when the cluster name ConfigMap changes.
# This uses the checksum annotation pattern to trigger rollouts when the
# parent chart's splunk-otel-collector-obi-env ConfigMap is updated.
checksum/clusterName: '{{ .Values.clusterName | default "" | sha256sum }}'
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

The template expression {{ .Values.clusterName | default "" | sha256sum }} will not correctly resolve the parent chart's clusterName value when evaluated by the OBI subchart. In Helm, when a subchart evaluates a template expression, .Values refers to the subchart's values scope (i.e., values under the obi: key), not the parent chart's root values. The clusterName is defined at the root level of the parent chart's values, so it won't be accessible as .Values.clusterName from the subchart's perspective.

Evidence of this issue can be seen in the rendered manifest at examples/ebpf-instrumentation/rendered_manifests/obi/daemonset.yaml:27, where the checksum shows the SHA256 of an empty string (e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855), despite examples/ebpf-instrumentation/values.yaml:11 setting clusterName to "CHANGEME".

To fix this, the clusterName value needs to be made accessible to the subchart. Consider one of these approaches:

  1. Pass clusterName as a subchart value: Add clusterName: {{ .Values.clusterName }} under the obi: section in the parent chart, then reference it as {{ .Values.clusterName }} in the annotation
  2. Use Helm's global values: Move clusterName to be a global value accessible to subcharts as {{ .Values.global.clusterName }}
  3. Compute the checksum in the parent chart's template and pass the result to the subchart

Copilot uses AI. Check for mistakes.
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.

3 participants