Skip to content

feat: add metadata integration for agent-control-deployment#2179

Open
jcoscollanr wants to merge 3 commits intomasterfrom
feat/metadata-agent-control
Open

feat: add metadata integration for agent-control-deployment#2179
jcoscollanr wants to merge 3 commits intomasterfrom
feat/metadata-agent-control

Conversation

@jcoscollanr
Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

On each release of agent-control in k8s it sends to the metadata service that a new version is available

Which issue this PR fixes

Special notes for your reviewer:

This is the same that for other charts. The only difference is that for this one we need the appVersion

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

  • Chart Version bumped
  • Variables are documented in the README.md
  • Title of the PR starts with chart name (e.g. [mychartname])

Release Notes to Publish (nr-k8s-otel-collector)

If this PR contains changes in nr-k8s-otel-collector, please complete the following section. All other charts should ignore this section.

🚀 What's Changed

  • Tell the world about the latest changes in the chart.

@jcoscollanr jcoscollanr self-assigned this Mar 23, 2026
@jcoscollanr jcoscollanr requested review from a team as code owners March 23, 2026 14:24
Comment on lines +61 to +63
if [[ "${{ matrix.chart }}" == "agent-control-deployment" ]]; then
VERSION=$(yq '.appVersion' charts/${{ matrix.chart }}/Chart.yaml | tr -d '"')
echo "Extracted version from Chart.yaml appVersion: $VERSION"
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 think the version we need is not .appVersion (which matches with the agent-control docker image) but .version which identifies this chart's version.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

actually, I did this on purpose.

The main idea is that we want the version to be the same as in the hosts, for the requirements. We can say this works with this version of agent-control

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.

We have just discussed it offline, this version is not used for self-update but requirements therefore, we do need the appVersion which tells us that the version of the Agent Control binaries is available to be used in K8s. When working on the self-update experience, we will also need the chart-version.

VERSION="${{ github.event.release.tag_name }}"
VERSION="${VERSION#${{ matrix.chart }}-}"
if [[ "${{ matrix.chart }}" == "agent-control-deployment" ]]; then
VERSION=$(yq '.appVersion' charts/${{ matrix.chart }}/Chart.yaml | tr -d '"')
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.

@jcoscollanr we are about to remove the appVersion and move back the tag to the values to improve our release process. So once that change is merged the tag will be under values.yaml image.tag

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.

5 participants