k8sgpt
k8sgpt copied to clipboard
[Feature]: Exclude a list of known issues
Checklist
- [X] I've searched for similar issues and couldn't find anything matching
- [ ] I've discussed this feature request in the K8sGPT Slack and got positive feedback
Is this feature request related to a problem?
No
Problem Description
When I run k8sgpt analyze
there are a few results that I know about, and I'd like to exclude.
E.g.:
➜ ~ k8sgpt --kubeconfig ~/work/remote-kube.conf analyze
Service openebs/openebs.io-local does not exist
0 minio/ha-minio(ha-minio)
- Error: Service has no endpoints, expected label app=ha-minio
I know that these two are present, and don't want to be reminded about that to reduce the noise. I want to see new issues, so that when something is broken I know the messages shown are relevant.
Solution Description
I would like to be able to supply a config file (json?) of error descriptions that can be excluded/ignored.
Benefits
This means clusters with some minor, known, issues can take advantage of the analyzer when something new comes up, and the results can be shown to folks who are unfamiliar with the results from when the cluster is working fine.
Potential Drawbacks
The issues are likely valid, and should be fixed, and removing the visibility of them will discourage best practices.
Additional Information
I didn't get access to the Slack to discuss this, and don't know how to get that.
Is anyone working on this? If no then I'd like to take this up.
We have no concensus on the design yet, do you want to propose something first @rakshitgondwal ?
@rakshitgondwal any follow up on this?
I'll try come up with a draft proposal in the next week.
Update: Will be traveling to KCD Mumbai this weekend so will submit a draft next week.
@AlexsJones, @xavpaice, would passing a JSON file containing an exceptions object using an -exceptions
flag be a good idea?
This object can be passed to the analyze
command, and maybe then we can process the exceptions and exclude them from results if they're present.
And I think that we can support exceptions based on the following fields:
Kind string `json:"kind"`
Name string `json:"name"`
Error []Failure `json:"error"`
Details string `json:"details"`
ParentObject string `json:"parentObject"`
Along with support for regular expressions.
@arbreezy mind sharing your thoughts on this? Thanks!