Backend - Send cluster error messages to frontend (Index view)
Problem
When the cluster resources are not displayed there are various causes for this. In my knowledge:
- If number of nodes information is not displayed there is a Connectivity error or an Authentication error.
- If CPU and Memory information is not displayed then there might be a connectivity or Authentication error but it might be a result of the cluster not having a metrics tool installed.
This issue is intended to document and design the errors so that we can help the users understand the problem and take the appropriate steps towards fixing it.
The errors we currently track are:
-
Gitlab::Kubernetes::Errors::CONNECTION
, which could mean Cluster Unreachable / Timeout trying to connect to cluster. -
Gitlab::Kubernetes::Errors::AUTHENTICATION
, which means Authentication Failure. Could have different reasons like, Wrong SSL Certificate, or the user does not have access to a certain resource. For some reason, I think the AWS missing metric server falls here. It would be nice to give a special hint if metrics fails with this error and the provider is not GKE. We could say "Please double check you have metrics server installed". We could even share links to how to install them on EKS. -
Kubeclient::HttpError
, this is pretty generic. I think it can have many cases. One of them might be Resource not found. - Finally we track all other unexpected errors as Unknown Failure.
These errors need to be passed to the fronted. In future issues (#220182 (closed)) we will deal with displaying the error messages.
Edited by Viktor Nagy (GitLab)