Commit Graph

13 Commits

Author SHA1 Message Date
Evans Mungai
e5e26eea14 fix(support-bundle): default in-cluster collectors in host support bundle (#1394)
* fix(support-bundle): default in-cluster collectors in host support bundle

Ensure cluster-resources and cluster-info collectors are present only
when a support bundle spec contains in-cluster collectors.

* Various improvements

* Improve error messages
* Util function appending elements to a nil slice that allows adding
  specs to an empty slice of collectors/analysers/redactors

* Fix failing test
2023-11-27 18:33:02 +00:00
Evans Mungai
312e467160 fix: embed troubleshoot version string from module dependency (#1371)
If troubleshoot is used as a dependency in go.mod, the version
information of the release would be missing at runtime. This is
because the version string is injected to binaries at build time
using linker flags (LD) passed to the compiler (check Makefile)
2023-10-16 13:51:55 +01:00
Evans Mungai
b9f4fc4390 feat: Dry run flag to print preflight specs to std out (#1240) 2023-09-12 14:42:10 +01:00
Evans Mungai
401dfe2c57 feat: add loader APIs to load specs from raw troubleshoot spec (#1202)
* feat: add loader APIs to load specs from a list of yaml docs

The change introduces a loader package that will contain loader
public APIs. The aim of these APIs will be to, given any source of
troubleshoot specs, the loaders will fetch the specs and parse out
all troubleshoot objects that can be extracted.

* Some refactoring

* Some more changes

* More changes caught when testing vendor portal

* Add tests and rename Troubleshoot kinds struct

* Additional test

* Handle ConfigMap and Secrets with multiple specs in them

* Fix failing test

* Revert multidoc split implementation

* Fix merge conflict

* Change LoadFromXXX functions to a single LoadSpecs function
2023-06-06 16:48:29 -04:00
Evans Mungai
546ffde14b feat: use klog as the default logging library (#1008) 2023-02-24 18:24:51 +00:00
Evans Mungai
a31e2ff1b9 chore: Add CLI flags to enable CPU & memory profiling (#926)
Allow collecting of CPU and memory diagnostics when running troubleshoot CLI applications using --memprofile and --cpuprofile flags. These flags accept file paths if where to store the collected runtime data
2023-01-04 11:56:07 +00:00
Ethan Mosbaugh
7c74f8b755 Disable client-go logging 2022-06-10 15:39:23 +00:00
divolgin
6e86cdc803 Allow preflight spec to be loaded from a secret 2020-10-01 01:37:37 +00:00
Andrew Lavery
9692d5a457 attempt to read the file at the provided path before trying url 2020-03-25 17:27:16 -04:00
Andrew Lavery
f67cd31e80 fix order of arguments in calls to DownloadAndAnalyze 2020-01-20 18:17:15 -08:00
divolgin
8e1cb615a5 Don't print usage on error and no double-logging 2019-12-24 22:04:43 +00:00
Marc Campbell
8a1bb8a422 isURL 2019-10-29 19:56:29 +00:00
Marc Campbell
14ace5294f Analyze spec 2019-10-29 19:45:25 +00:00