-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle more resource kind health status #418
Comments
Hi, |
Feel free to bring PR @iamvikaskumar |
Thanks @undera . Could you please provide some more details about the issue. |
Please let me know if I got it wrong ? |
Yes, your understanding is correct. We want to have more meaningful |
Thanks for your reply @undera . I have one more doubt before I raise the PR... when a resource have more than one condition e.g. in case of CRD (refer the image below), do we mark hdHealth as healthy only if all the conditions has status as "True" ? |
There is no strict rule to set
So for your example of CRD above, the custom logic may be to have both conditions True. But that is only for CustomResourceDefinition, and not general rule. |
@undera I tried deleting a resource with Should we change the code to broadly follow something like the idea presented below? Or there is already some lines of code that actually checks for "NotFound", which I missed? ...
// custom logic to provide most meaningful status for the resource
if err != nil {
if errors.IsNotFound(err) {
c.Status = Unhealthy
c.Reason = "NotFound"
c.Message = err.Error()
} else {
c.Status = Unknown //Or Unhealthy anyway?
c.Reason = "ErrorGettingStatus"
c.Message = err.Error()
}
... After the change, this will be the dashboard output |
@alessandrodetta Your proposition is correct. If we know the resource does not exist - we should set status to that, it's better than generic failure |
@undera Is this issue still valid one for the contribution? |
@visionaryfire I believe so |
In backend call like
/api/helm/releases/:ns/:name/resources?health=true
, we need to support more resource kinds:CustomResourceDefinitionPodDisruptionBudgetAnd generally we need to handle unknown object kinds to at least show "Exists" status.
The text was updated successfully, but these errors were encountered: