* feat: allow templating of the outcome message for the JSON and YAML Compare analyzers
* Update pkg/analyze/json_compare.go
Co-authored-by: Evans Mungai <evans@replicated.com>
* feat: goldpinger analyser
Analyser to generate a report from goldpinger results
* Add goldpinger testdata
* Goldpinger collector
* Improvements after running tests
* More minor updates after further testing
* Better error message if a container fails to start
* A few more updates
* Add goldpinger e2e test
* Update schemas
* Clean up help installs in e2e tests
* Add resource limits to goldpinger pods
* Some minor improvements
* Some more changes noted when writing docs
* Update schemas
* A few more updates when testing with kURL
* Log goldpinger tests
* Tests before exit code
* 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
* Add dry-run flag
* No traces on dry run
* More refactoring
* More updates to support bundle binary
* More refactoring changes
* Different approach of loading specs from URIs
* Self review
* More changes after review and testing
* fix how we parse oci image uri
* Remove unnecessary comment
* Add missing file
* Fix failing tests
* Better error check for no collectors
* Add default collectors when parsing support bundle specs
* Add missed test fixture
* Download specs with correct headers
* Fix typo
* chore: make specs an internal package
* Some minor improvements
* Use LoadClusterSpecs in support bundle implementation
* Remove change accidentally committed
* Use LoadFromCLIArgs in preflight CLI implementation
* Update comment
* Fix edge case where the label selector is an empty string
* Fix failing test
* feat: Add Strict flag to LoadSpecs API
Strict flag which can be used to toggle between true
(raising errors if a document is invalid)
and false (ignoring invalid documents, perhaps logging a warning).
* Granular error handling multidocs in secrets and configmaps
* Fix failing test
* 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
* Boiler plate for host copy collector
* feat: Add copy host collector
* Add tests
* No need to handle symlinks in a special way
System libraries (os.ReadAll, os.ReadDir) already handle symlinks
When running a support bundle, we want to know how long each operation
(collect, redact, analyze) takes. This commit adds a new trace exporter
that records the start and end times of each operation, and then prints
a summary of the execution. The summary is also stored in the support
bundle.
Related to #923
* adding test coverage for preflight.RunPreflights()
TDD to work on https://github.com/replicatedhq/troubleshoot/issues/906
and verify the fix is successful
* go.mod/go.sum: removing gnomock stuff since it's not in use (yet)
* Makefile: try running the preflight integration test with the e2e tests,
since there's a K3s instance in place already
* Makefile add a dedicated test-integration task, which runs as it's own
github action job
* Makefile: exclude a few things from test-integration that break the
github action job
* WIP on preflight tests, addressing some of @banjoh's feedback, more to
go though (specifically changing over to using assert)
* preflight tests: use the testify libraries, restructure code to be
formatted more like other tests in this project
* feat(redactors): Run redactors on an existing support bundle
Add redact subcommand to support-bundle to allow running redactors on an
existing bundle to creating a new redacted bundle.
The command will be launched like so
support-bundle redact <redactor urls> --bundle support-bundle.tar.gz
Fixes: #705