nr-ebpf-agent: Add Comprehensive Global Value Inheritance Test Coverage #2021
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds comprehensive test coverage validating global value inheritance for all applicable values from the nri-bundle global values contract. The chart uses the common-library pattern; this work adds explicit validation tests and completes all applicable global value support.
Changes
Template Fix
templates/nr-ebpf-agent-daemonset.yamlto usenewrelic.common.clusterhelper for global.cluster inheritanceAdded Comprehensive Global Value Inheritance Tests
tests/global_inheritance_test.yamlTest Results
Test coverage includes:
Global Values Coverage
All 27 global values from the nri-bundle global contract assessed:
Legend:
Yes- Chart includes explicit helm-unittest test coverageImplicit- Tested implicitly through other test scenarios (e.g., alternative auth paths)No- Value not tested (known limitation preventing full testing, see Known Limitations)No- Value not applicable to this chart typeTesting Approach: This chart validates ALL applicable global values through EXPLICIT helm-unittest test coverage with dedicated test cases for each value. Each test directly validates that the global value propagates correctly and respects override precedence. No implicit testing - every applicable value has dedicated assertions proving it works in this chart's context.
Files Modified
charts/nr-ebpf-agent/templates/nr-ebpf-agent-daemonset.yaml- Fixed cluster to usenewrelic.common.clusterhelper for global.cluster inheritancecharts/nr-ebpf-agent/tests/global_inheritance_test.yaml- Added 10 new test cases for complete coverageDesign Decisions
Hardcoded Security and Networking Settings
The following settings are intentionally hardcoded based on eBPF technical requirements and are not configurable via global or local values:
nr-ebpf-agent DaemonSet
otel-collector DaemonSet
These are chart-specific security and networking requirements for eBPF kernel instrumentation. Making these configurable would risk breaking core functionality or creating security vulnerabilities. The eBPF agent requires privileged host access by design, while the OTel collector operates with standard Kubernetes networking.
No Breaking Changes
Build Status
Changelog Entry