diff --git a/apps/otel/otel-rbac.yaml b/apps/otel/otel-rbac.yaml index cb4e15b..938d917 100644 --- a/apps/otel/otel-rbac.yaml +++ b/apps/otel/otel-rbac.yaml @@ -9,6 +9,9 @@ rules: - apiGroups: ["apps"] resources: ["deployments", "statefulsets", "daemonsets", "replicasets"] verbs: ["get", "list", "watch"] + - apiGroups: [""] + resources: ["nodes/stats"] + verbs: ["get", "watch", "list"] --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding diff --git a/apps/otel/otel.yaml b/apps/otel/otel.yaml index 3e2bf3c..c83e431 100644 --- a/apps/otel/otel.yaml +++ b/apps/otel/otel.yaml @@ -4,11 +4,6 @@ metadata: name: otel spec: mode: daemonset - presets: - kubeletMetrics: - enabled: true - hostMetrics: - enabled: true env: - name: CLICKHOUSE_PASSWORD valueFrom: @@ -54,6 +49,15 @@ spec: endpoint: 0.0.0.0:4318 auth: authenticator: basicauth + kubeletstats: + collection_interval: 10s + auth_type: "serviceAccount" + endpoint: "${env:K8S_NODE_NAME}:10250" + insecure_skip_verify: true + metric_groups: + - node + - pod + - container processors: memory_limiter: @@ -112,7 +116,7 @@ spec: processors: [k8sattributes, memory_limiter, batch] exporters: [clickhouse] metrics: - receivers: [otlp, hostmetrics] + receivers: [otlp, hostmetrics, kubeletstats] processors: [k8sattributes, memory_limiter, batch] exporters: [clickhouse] logs: