From 9eec0e416cc319fd28eb2e2d9dc33b337a74fa97 Mon Sep 17 00:00:00 2001 From: Alex Chang Date: Wed, 25 Feb 2026 18:31:21 -0800 Subject: [PATCH 1/2] update to seconds to match what is already defined in the configmaps --- charts/nr-k8s-otel-collector/values.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/nr-k8s-otel-collector/values.yaml b/charts/nr-k8s-otel-collector/values.yaml index ef999a7146..265ce44e91 100644 --- a/charts/nr-k8s-otel-collector/values.yaml +++ b/charts/nr-k8s-otel-collector/values.yaml @@ -332,9 +332,9 @@ collectorObservability: # -- (bool) Specifies whether the collector reports its own metrics # @default -- `false` enabled: false - # -- Specifies the interval at which the collector reports its metrics (in milliseconds) - # @default -- `60000` - scrapeIntervalMs: 60000 + # -- Specifies the interval at which the collector reports its metrics (in seconds) + # @default -- `60` + scrapeIntervalSeconds: 60 # -- (bool) Send only the [metrics required](https://github.com/newrelic/helm-charts/tree/master/charts/nr-k8s-otel-collector/docs/metrics-lowDataMode.md) to light up the NR kubernetes UI # @default -- `true` From 130981c46ad74447a742540c79c182bd7a6ed271 Mon Sep 17 00:00:00 2001 From: Alex Chang Date: Wed, 25 Feb 2026 18:45:29 -0800 Subject: [PATCH 2/2] add resource attributes --- charts/nr-k8s-otel-collector/Chart.yaml | 2 +- .../templates/daemonset-configmap.yaml | 5 +++++ .../templates/deployment-configmap.yaml | 5 +++++ charts/nr-k8s-otel-collector/values.yaml | 9 +++++++++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/charts/nr-k8s-otel-collector/Chart.yaml b/charts/nr-k8s-otel-collector/Chart.yaml index 235a353b3c..42678b831a 100644 --- a/charts/nr-k8s-otel-collector/Chart.yaml +++ b/charts/nr-k8s-otel-collector/Chart.yaml @@ -17,7 +17,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.10.8 +version: 0.10.9 dependencies: diff --git a/charts/nr-k8s-otel-collector/templates/daemonset-configmap.yaml b/charts/nr-k8s-otel-collector/templates/daemonset-configmap.yaml index 0cfca4cf9a..db669db929 100644 --- a/charts/nr-k8s-otel-collector/templates/daemonset-configmap.yaml +++ b/charts/nr-k8s-otel-collector/templates/daemonset-configmap.yaml @@ -827,6 +827,11 @@ data: endpoint: {{ include "nrKubernetesOtel.endpoint" . }} headers: api-key: ${env:NR_LICENSE_KEY} + resource: + k8s.cluster.name: {{ include "newrelic.common.cluster" . }} + {{- range $k, $v := .Values.collectorObservability.resource }} + {{ $k }}: {{ $v }} + {{- end }} {{- end }} pipelines: {{- include "nrKubernetesOtel.daemonset.configMap.extraConfig.pipelines" . | nindent 8 }} diff --git a/charts/nr-k8s-otel-collector/templates/deployment-configmap.yaml b/charts/nr-k8s-otel-collector/templates/deployment-configmap.yaml index f2e51b7ade..d3319501e0 100644 --- a/charts/nr-k8s-otel-collector/templates/deployment-configmap.yaml +++ b/charts/nr-k8s-otel-collector/templates/deployment-configmap.yaml @@ -804,6 +804,11 @@ data: endpoint: {{ include "nrKubernetesOtel.endpoint" . }} headers: api-key: ${env:NR_LICENSE_KEY} + resource: + k8s.cluster.name: {{ include "newrelic.common.cluster" . }} + {{- range $k, $v := .Values.collectorObservability.resource }} + {{ $k }}: {{ $v }} + {{- end }} {{- end }} pipelines: {{- include "nrKubernetesOtel.deployment.configMap.extraConfig.pipelines" . | nindent 8 }} diff --git a/charts/nr-k8s-otel-collector/values.yaml b/charts/nr-k8s-otel-collector/values.yaml index 265ce44e91..2039656a4b 100644 --- a/charts/nr-k8s-otel-collector/values.yaml +++ b/charts/nr-k8s-otel-collector/values.yaml @@ -335,6 +335,15 @@ collectorObservability: # -- Specifies the interval at which the collector reports its metrics (in seconds) # @default -- `60` scrapeIntervalSeconds: 60 + # -- Additional resource attributes to attach to its internal metrics. + # k8s.cluster.name is automatically populated from the cluster value. + # Useful for adding attributes such as env to distinguish between environments + # in multi-cluster deployments. + # Example: + # resource: + # env: production + # @default -- `{}` + resource: {} # -- (bool) Send only the [metrics required](https://github.com/newrelic/helm-charts/tree/master/charts/nr-k8s-otel-collector/docs/metrics-lowDataMode.md) to light up the NR kubernetes UI # @default -- `true`