From 21b6c403f90672a545b0b7d7091a1b573fae1057 Mon Sep 17 00:00:00 2001 From: Srikanth Chekuri Date: Mon, 4 Nov 2024 12:35:29 +0530 Subject: [PATCH] Enable additional resource attributed for cluster metrics --- 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