12 Commits
Author SHA1 Message Date
Johannes Tuchscherer ef1cd66b1e Handling the case when the Cluster Analyzer doesn't find a resource (#1760)
* Handling the case when the Cluster Analyzer doesn't find a resource

* Add namespace information to Resource not found fail message
2025-03-14 11:22:49 -07:00
Dexter YanandEvans Mungai 64ee9e5596 feat(nodeResources): add GPU support (#1708)
* feat(nodeResources): add GPU support

* add resourceCapacity and sum test

* update with make schemas

* Correct tests names

Signed-off-by: Evans Mungai <evans@replicated.com>

---------

Signed-off-by: Evans Mungai <evans@replicated.com>
Co-authored-by: Evans Mungai <evans@replicated.com>
2025-01-03 15:11:10 +13:00
Dexter Yan 51c07b42c3 feat(analyzer): let cluster resource case insensitive to fix name inconsistent (#1547)
* feat(analyzer): let cluster resource case insensitive
2024-05-22 11:37:39 +12:00
Dexter Yan f69ae77bc3 feat(analyzer): add detailed message for unhealthy pod (#1261)
* feat(analyzer): add detailed message for unhealthy pod
2023-07-17 08:01:40 +12:00
Diamon Wiggins 3b61b3025e Add regex to clusterResources analyzer (#1189)
* similar to the textAnalyze analyzer, adds support to evaluate the value at the specified yamlPath with regex or regexGroups
* fixes a typo in the shorthand name used for searching for cluster resource PVC objects
2023-05-30 17:53:03 -04:00
Diamon WigginsandCamila Macedo 9a457f7f72 fix/clusterPodStatuses: only process when conditional if specified (#1088)
* only process when conditional if specified

* adding tests for cluster pod status analyzer

* use klog instead of fmt for logging

* add additional tests for warn and more operators

---------

Co-authored-by: Camila Macedo <7708031+camilamacedo86@users.noreply.github.com>
2023-04-06 09:17:33 +01:00
danj-replicated e48fa36eaf Add generic kubernetes resource analyzer (#780)
* First draft of a generic cluster-resource analyzer

* Add more resource mappings

* Support some cluster-scoped resources

the structure of this could probably be a bit tidyer, but this now
allows us to target non-namespaced resources simply by not specifying
the namespace in the analyzer.

* General tidy up

* pull resource selection into it's own function

* remove pointless pointer to string

* Export findResource function

This lets other analyzers use it.

* Add tests for cluster resources analyzer

* Update schemas

* Address some of @banjoh's comments

* rework resource selection

thanks @banjoh

* Replace FindFiles with GetFile

Since we already know where we're looking for files,
it doesn't make sense to have to loop over a single item slice.

* Use assert instead of require

* format

* Change default behaviour for no namespace

Now not providing a namespace causes us to default to "default", with an
explicit bool to toggle cluster-scoped resource checking.

This should feel somewhat more intuitive when writing analyzers that use
this function

* Generate schemas

* Value → expectedValue
2022-12-19 11:31:43 -04:00
divolgin 3351c289ab Add GVK to k8s objects in cluster-resources files 2022-02-04 01:31:07 +00:00
divolgin 007edd1181 Allow specifying namespaces when analyzing cluster resources 2021-12-17 21:47:06 +00:00
divolgin 3cedbe16a7 Organize test files by type and namespace 2021-12-17 19:23:54 +00:00
divolgin ada35eb31c Replicaset collector and analyzer 2021-10-27 20:24:14 +00:00
divolgin 1cdfd96768 Jobs status analyzer 2021-10-26 23:41:02 +00:00