Workspace metrics not working #21058
Labels
kind/bug
Outline of a bug - must adhere to the bug report template.
status/duplicate
Issue identified as a duplicate of another issue
Describe the bug
The resource monitor doesn't show the CPU and memory usage:
The
che
pod log keeps showing the following message: Unable to add metrics roles due to insufficient permissions. Workspace metrics will be disabled.After doing some tests I found that if I add the role and the role binding manually to the metrics API group (metrics.k8s.io) in k8s to service account
che-workspace
in the workspace namespace the resource monitor in the Eclipse Theia starts showing the CPU and memory usage as it should. I used this file to add this role and role binding:Futher investigating the problem I found that this message is logged at line 152 of
org.eclipse.che.workspace.infrastructure.kubernetes.namespace.AbstractWorkspaceServiceAccount
, triggered by the exception thrown by the call at line 137 -k8sClient.supportsApiPath("/apis/metrics.k8s.io")
(all lines are from tag 7.42.0). In the Eclipse Che log I forced a stack print of this exception.All other roles (
workspace-configmaps
,workspace-secrets
,...) are created normally.Che version
7.42@latest
Steps to reproduce
Expected behavior
The resources monitor in Eclipse Theia showing the CPU and memory usage
Runtime
Kubernetes (vanilla)
Screenshots
No response
Installation method
other (please specify in additional context)
Environment
Linux
Eclipse Che Logs
Additional context
Tested in two clusters provisioned with kubeadm, one with k8s 1.21 and the other with 1.23 (single-node). Both running in RHEL 8.4.
Helm chart installed from here: https://eclipse-che.github.io/che-operator/charts
The text was updated successfully, but these errors were encountered: