Commit cff10aa
authored
[nr-k8s-otel-collector] chore: exclude container overlay path in OKE (#2114)
#### What this PR does / why we need it:
Deploying the nr-k8s-otel-collector chart to an OKE cluster will result
in a functional DaemonSet, but the DaemonSet logs will include the
following log on each scrape interval:
```
2026-02-10T19:11:45.349Z error scraperhelper@v0.142.0/obs_metrics.go:61 Error scraping metrics {"resource": {"service.instance.id": "0423df01-041e-4e36-aaa0-284cd7dba542", "service.name": "nrdot-collector-k8s", "service.version": "1.8.0"}, "otelcol.component.id": "hostmetrics", "otelcol.component.kind": "receiver", "otelcol.signal": "metrics", "error": "failed to read usage at /hostfs/var/lib/containers/storage/overlay: permission denied"}
go.opentelemetry.io/collector/scraper/scraperhelper.wrapObsMetrics.func1
go.opentelemetry.io/collector/scraper/scraperhelper@v0.142.0/obs_metrics.go:61
go.opentelemetry.io/collector/scraper.ScrapeMetricsFunc.ScrapeMetrics
go.opentelemetry.io/collector/scraper@v0.142.0/metrics.go:24
go.opentelemetry.io/collector/scraper/scraperhelper.scrapeMetrics
go.opentelemetry.io/collector/scraper/scraperhelper@v0.142.0/controller.go:256
go.opentelemetry.io/collector/scraper/scraperhelper.NewMetricsController.func1
go.opentelemetry.io/collector/scraper/scraperhelper@v0.142.0/controller.go:228
go.opentelemetry.io/collector/scraper/scraperhelper.(*controller[...]).startScraping.func1
go.opentelemetry.io/collector/scraper/scraperhelper@v0.142.0/controller.go:171
```
**This error also occurs in the vanilla opentelemetry collector chart
when deployed to OKE**. OKE uses the CRI-O container runtime, and the
nonroot user cannot access this particular path. Excluding the mount
path when the user is running as nonroot will prevent the error from
appearing in logs. If the user chooses to run as root or in privileged
mode, the path will be allowed.
#### 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.]
- [x] Chart Version bumped
- [x] 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.
<!--BEGIN-RELEASE-NOTES-->
## 🚀 What's Changed
* Excludes the var/lib/containers/storage/overlay path from hostmetrics
receiver when running as nonroot, which was throwing permission denied
errors in OKE.
<!--END-RELEASE-NOTES-->1 parent 96436be commit cff10aa
File tree
13 files changed
+238
-15
lines changed- charts/nr-k8s-otel-collector
- examples/k8s/rendered
- templates
- tests
13 files changed
+238
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
46 | 52 | | |
47 | 53 | | |
48 | 54 | | |
| |||
607 | 613 | | |
608 | 614 | | |
609 | 615 | | |
610 | | - | |
| 616 | + | |
611 | 617 | | |
612 | 618 | | |
613 | 619 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
519 | | - | |
| 519 | + | |
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
| |||
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
537 | | - | |
| 537 | + | |
538 | 538 | | |
539 | 539 | | |
540 | 540 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
0 commit comments