diff --git a/charts/otel-collector/Chart.yaml b/charts/otel-collector/Chart.yaml index f6f863c5e..e980c4397 100644 --- a/charts/otel-collector/Chart.yaml +++ b/charts/otel-collector/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: otel-collector description: Workflows otel-collector type: application -version: 0.1.2 +version: 0.1.3 dependencies: - name: opentelemetry-collector repository: https://open-telemetry.github.io/opentelemetry-helm-charts diff --git a/charts/otel-collector/templates/role.yaml b/charts/otel-collector/templates/role.yaml index a63489c4a..10a3cfb54 100644 --- a/charts/otel-collector/templates/role.yaml +++ b/charts/otel-collector/templates/role.yaml @@ -7,3 +7,12 @@ rules: - apiGroups: [""] resources: ["pods", "services", "endpoints"] verbs: ["get", "list", "watch"] + - apiGroups: [""] + resources: ["nodes", "namespaces", "replicationcontrollers", "resourcequotas"] + verbs: ["list", "watch"] + - apiGroups: ["apps"] + resources: ["deployments", "replicasets", "statefulsets", "daemonsets"] + verbs: ["list", "watch"] + - apiGroups: ["autoscaling"] + resources: ["horizontalpodautoscalers"] + verbs: ["list", "watch"] diff --git a/charts/otel-collector/values.yaml b/charts/otel-collector/values.yaml index 51bc953d8..95557e271 100644 --- a/charts/otel-collector/values.yaml +++ b/charts/otel-collector/values.yaml @@ -6,6 +6,8 @@ opentelemetry-collector: presets: kubernetesAttributes: enabled: true + clusterMetrics: + enabled: true ports: prometheus: enabled: true @@ -70,6 +72,15 @@ opentelemetry-collector: - sources: - from: connection receivers: + k8s_cluster: + node_condition_to_report: [Ready, MemoryPressure, DiskPressure] + allocatable_types_to_report: [cpu, memory, ephemerl-storage, pods] + collection_interval: 30s + metrics: + k8s.node.condition: + enabled: true + k8s.pod.status_reason: + enabled: true prometheus: config: scrape_configs: @@ -145,6 +156,7 @@ opentelemetry-collector: pipelines: metrics: receivers: + - k8s_cluster - prometheus - otlp processors: