Skip to content

[nr-ebpf-agent]: cos and bottle rocket support#2035

Merged
kkhandelwal-nr merged 16 commits intomasterfrom
kkhandelwal/cos_support
Dec 19, 2025
Merged

[nr-ebpf-agent]: cos and bottle rocket support#2035
kkhandelwal-nr merged 16 commits intomasterfrom
kkhandelwal/cos_support

Conversation

@kkhandelwal-nr
Copy link
Contributor

@kkhandelwal-nr kkhandelwal-nr commented Dec 11, 2025

Is this a new chart

No

What this PR does / why we need it:

  • Container-Optimized OS (COS) Support: Added full support for Google's Container-Optimized OS with automatic kernel header installation
  • Bottlerocket OS Support: Added support for AWS Bottlerocket with automated kernel header retrieval
  • Enhanced Data Filtering: Introduced granular filtering capabilities for APM and network metrics data
    • apmDataFilters: Filter APM data by pod labels, entity names, or APM agent presence
    • networkMetricsDataFilter: Filter network metrics by pod labels or entity names
    • allDataFilters: Global filters affecting all data types
  • Refactored Init Container: Moved kernel header installation logic from inline bash to ConfigMap-based script for better maintainability
  • Configuration Reorganization: Restructured values.yaml with clearer naming and logical grouping
    • tcpStatsReporting → networkMetricsReporting
    • dropDataNewRelic → allDataFilters.dropNewRelicBundle
    • dropDataForNamespaces → allDataFilters.dropNamespaces
    • dropDataServiceNameRegex → allDataFilters.dropServiceNameRegex
    • allowServiceNameRegex → allDataFilters.keepServiceNameRegex
  • Added installer-script ConfigMap for init container logic

Which issue this PR fixes

(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

  • fixes #

Special notes for your reviewer:

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])

echo "/host/etc/os-release not found"
echo "Proceeding without kernel header install."
fi
image: {{ .Values.ebpfAgent.image.repository }}:agent-base-image-latest
Copy link

@stefansedich stefansedich Dec 12, 2025

Choose a reason for hiding this comment

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

Should the image tag here not be configurable too?

Copy link

@stefansedich stefansedich left a comment

Choose a reason for hiding this comment

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

We would need the image tag for the init container configurable too for this to work for us.

kkhandelwal-nr and others added 10 commits December 12, 2025 11:45
<meta charset="utf-8"><b style="font-weight:normal;"
id="docs-internal-guid-41b7f31b-7fff-e5e4-8bcd-5846874602bb"><h3
dir="ltr"
style="line-height:1.38;margin-top:16pt;margin-bottom:4pt;"><span
style="font-size:13.999999999999998pt;font-family:Arial,sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;">k8s
:&nbsp;</span></h3><br /><div dir="ltr" style="margin-left:0pt;"
align="left">
Current env name | Renamed
-- | --
tcpStatsReporting | networkMetricsReporting
dropDataNewRelic | allDataFilters.dropNewRelicBundle
dropDataForNamespaces | allDataFilters.dropNamespaces
dropDataServiceNameRegex | allDataFilters.dropDataServiceNameRegex
allowServiceNameRegex | allDataFilters.keepServiceNameRegex
tcpStatsReporting | networkMetricsReporting

</div></b>

<meta charset="utf-8"><b style="font-weight:normal;"
id="docs-internal-guid-9267a4b7-7fff-1975-0a68-ea2021ac0361"><h3
dir="ltr"
style="line-height:1.38;margin-top:16pt;margin-bottom:4pt;"><span
style="font-size:13.999999999999998pt;font-family:Arial,sans-serif;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;">env:</span></h3><br
/><div dir="ltr" style="margin-left:0pt;" align="left">
Current env name | Renamed
-- | --
DROP_DATA_NEW_RELIC | DROP_ALL_DATA_FOR_NEW_RELIC
DROP_APM_ENABLED_PODS | DROP_ALL_DATA_FOR_APM_AGENT_ENABLED_ENTITY
DROP_DATA_FOR_NAMESPACES | DROP_ALL_DATA_FOR_NAMESPACES
DROP_SERVICE_NAME_REGEX | DROP_ALL_DATA_FOR_SERVICE_NAME_REGEX
ALLOW_SERVICE_NAME_REGEX | DROP_ALL_DATA_FOR_ENTITY_NAME_REGEX
DROP_DATA_FOR_ENTITY | DROP_ALL_DATA_FOR_ENTITY_NAME_REGEX
TCP_STATS_REPORTING | NETWORK_METRICS_REPORTING

</div><br /><br /></b>
@kkhandelwal-nr kkhandelwal-nr marked this pull request as ready for review December 19, 2025 09:33
@kkhandelwal-nr kkhandelwal-nr requested a review from a team as a code owner December 19, 2025 09:33
sumitsuthar
sumitsuthar previously approved these changes Dec 19, 2025
@kkhandelwal-nr
Copy link
Contributor Author

kkhandelwal-nr commented Dec 19, 2025

@stefansedich We'll need to introduce a new param in the values.yaml in order to make image tag for init container configurable. I would like to understand why the current implementation will not work in your case?

Copy link
Contributor

@burhan-nr burhan-nr left a comment

Choose a reason for hiding this comment

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

LGTM

@kkhandelwal-nr kkhandelwal-nr merged commit 48fc6dd into master Dec 19, 2025
13 checks passed
@kkhandelwal-nr kkhandelwal-nr deleted the kkhandelwal/cos_support branch December 19, 2025 11:40
@stefansedich
Copy link

@stefansedich We'll need to introduce a new param in the values.yaml in order to make image tag for init container configurable. I would like to understand why the current implementation will not work in your case?

@kkhandelwal-nr we utilize immutable tags in our private ECR repo where we copy images to, a mutable tag would not work for us and is not best practice either, a new version of an image should be a new tag.

@stefansedich
Copy link

@kkhandelwal-nr any guidance on this one? would it be possible for the init container to use an image that does not have a mutable tag?

@kkhandelwal-nr
Copy link
Contributor Author

@stefansedich The base image for init container is updated only when we need to upgrade package version that resides in the image. Other than that, there is no update in functionality. Hence we keep this a mutable tag.
To help you out, we can introduce a new param for base image tag in the values.yml in the next release.
Please let us know if this unblocks you.

@stefansedich
Copy link

@stefansedich The base image for init container is updated only when we need to upgrade package version that resides in the image. Other than that, there is no update in functionality. Hence we keep this a mutable tag. To help you out, we can introduce a new param for base image tag in the values.yml in the next release. Please let us know if this unblocks you.

I assume we could then just use the main versioned image for the init container? if so that would work for us.

@kkhandelwal-nr
Copy link
Contributor Author

Yes. Since we push updates for base image to same tag, you can pull that image, retag it for your private ECR repo and use your tag in the values.yml (using new param that we'll be introducing).

@stefansedich
Copy link

stefansedich commented Jan 22, 2026

Yes. Since we push updates for base image to same tag, you can pull that image, retag it for your private ECR repo and use your tag in the values.yml (using new param that we'll be introducing).

So I am unable to use the 1.2.0 tag for the init container? Is agent-base-image-latest pointing to 1.2.0 (latest tag) or is it a completely seperate image?

If these are seperate images it would make more sense if the image lived at say newrelic/newrelic-ebpf-agent-base and was also tagged for each release, could then utilise the latest tag to point to the latest release if desired.

Mashing it into the single repo like this and providing only a latest tag does not play nice with those out there following best practices.

@kkhandelwal-nr
Copy link
Contributor Author

So I am unable to use the 1.2.0 tag for the init container? Is agent-base-image-latest pointing to 1.2.0 (latest tag) or is it a completely separate image?

Yes, these are separate images. 1.2.0 is build on top of agent-base-image-latest.

If these are separate images it would make more sense if the image lived at say newrelic/newrelic-ebpf-agent-base and was also tagged for each release, could then utilise the latest tag to point to the latest release if desired.

As mentioned earlier, we hardly make any updates in the base image. Hence we kept a mutable tag and used the existing repo. In future, we can surely move this to a separate repo if the changes are too frequent.

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