diff --git a/helm-chart/dash0-operator/templates/operator/cluster-roles.yaml b/helm-chart/dash0-operator/templates/operator/cluster-roles.yaml index c73b3bc1..e51ad222 100644 --- a/helm-chart/dash0-operator/templates/operator/cluster-roles.yaml +++ b/helm-chart/dash0-operator/templates/operator/cluster-roles.yaml @@ -238,6 +238,12 @@ rules: - get - list - watch +- apiGroups: + - "" + resources: + - nodes/proxy + verbs: + - get - apiGroups: - apps resources: diff --git a/helm-chart/dash0-operator/tests/operator/__snapshot__/cluster-roles_test.yaml.snap b/helm-chart/dash0-operator/tests/operator/__snapshot__/cluster-roles_test.yaml.snap index e33bac03..a89da561 100644 --- a/helm-chart/dash0-operator/tests/operator/__snapshot__/cluster-roles_test.yaml.snap +++ b/helm-chart/dash0-operator/tests/operator/__snapshot__/cluster-roles_test.yaml.snap @@ -200,6 +200,12 @@ cluster roles should match snapshot: - get - list - watch + - apiGroups: + - "" + resources: + - nodes/proxy + verbs: + - get - apiGroups: - apps resources: diff --git a/internal/backendconnection/otelcolresources/daemonset.config.yaml.template b/internal/backendconnection/otelcolresources/daemonset.config.yaml.template index 441afcd0..533cd15b 100644 --- a/internal/backendconnection/otelcolresources/daemonset.config.yaml.template +++ b/internal/backendconnection/otelcolresources/daemonset.config.yaml.template @@ -122,7 +122,10 @@ receivers: kubeletstats: auth_type: serviceAccount collection_interval: 20s - endpoint: ${env:K8S_NODE_NAME}:10250 + endpoint: '${env:K8S_NODE_NAME}:10250' + node: '${env:K8S_NODE_NAME}' + k8s_api_config: + auth_type: serviceAccount metrics: # deprecated -> container.cpu.usage container.cpu.utilization: diff --git a/internal/backendconnection/otelcolresources/desired_state.go b/internal/backendconnection/otelcolresources/desired_state.go index efd4c7e8..317c15a3 100644 --- a/internal/backendconnection/otelcolresources/desired_state.go +++ b/internal/backendconnection/otelcolresources/desired_state.go @@ -329,6 +329,14 @@ func assembleClusterRoleForDaemonSet(config *oTelColConfig) *rbacv1.ClusterRole }, Verbs: []string{"get", "watch", "list"}, }, + { + APIGroups: []string{""}, + Resources: []string{ + // required for Kubeletstats receiver ({request|limit}_utilization metrics) + "nodes/proxy", + }, + Verbs: []string{"get"}, + }, { APIGroups: []string{"apps"}, Resources: []string{"replicasets"},