From 4c3c5c1bc7551f7397123e84481bfa20b9edcbc0 Mon Sep 17 00:00:00 2001 From: Srikanth Chekuri Date: Mon, 4 Nov 2024 21:56:02 +0530 Subject: [PATCH] Enable additional resource attributes for cluster metrics (#547) --- charts/k8s-infra/templates/_config.tpl | 2 ++ charts/k8s-infra/values.yaml | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/charts/k8s-infra/templates/_config.tpl b/charts/k8s-infra/templates/_config.tpl index 03bb685..02f5670 100644 --- a/charts/k8s-infra/templates/_config.tpl +++ b/charts/k8s-infra/templates/_config.tpl @@ -167,6 +167,8 @@ receivers: {{- toYaml .Values.presets.clusterMetrics.allocatableTypesToReport | nindent 6 }} metrics: {{- toYaml .Values.presets.clusterMetrics.metrics | nindent 6 }} + resource_attributes: + {{- toYaml .Values.presets.clusterMetrics.resourceAttributes | nindent 6 }} {{- end }} {{- define "opentelemetry-collector.applyK8sEventsConfig" -}} diff --git a/charts/k8s-infra/values.yaml b/charts/k8s-infra/values.yaml index dbdcc0f..e33c32f 100644 --- a/charts/k8s-infra/values.yaml +++ b/charts/k8s-infra/values.yaml @@ -258,6 +258,17 @@ presets: clusterMetrics: enabled: true collectionInterval: 30s + resourceAttributes: + k8s.pod.qos_class: + enabled: true + k8s.kubelet.version: + enabled: true + container.runtime: + enabled: true + container.runtime.version: + enabled: true + k8s.container.status.last_terminated_reason: + enabled: true nodeConditionsToReport: - Ready - MemoryPressure