* new struct and update schemas
* implement Collect function
* add kernel config to collector struct
* generate kernel config analyzer schema
* implement kernel config analyzer
* fail on no match in pass outcome
* run make check-schemas
* fix failed unit test
* update from code review
* add selectedConfigs field
* run make check-schemas
* feat: node metrics analyser
The analyser only checks PVC usage at the moment. More analysers
can be added on a need to have basis
* Add tests
* Fix flaky test by waiting for goldpinger pods to start
* Fix how outcomes get checked
* Fix catch all outcome condition
* Fix test
* feat: node metrics analyser
The analyser only checks PVC usage at the moment. More analysers
can be added on a need to have basis
* Add tests
* Fix flaky test by waiting for goldpinger pods to start
* Fix how outcomes get checked
* Fix catch all outcome condition
* Fix test
* Regenerate schemas
* Fix failing test
---------
Co-authored-by: Dexter Yan <yanshaocong@gmail.com>
* feat: node metrics collector
A collector to collect node metrics served by the API server as
per the documented API https://kubernetes.io/docs/reference/instrumentation/node-metrics/
* Update CRD schemas
* Add tests
* Remove clean from build target
* Update comments
* Commit missing tests
* Remove unnecessary log in tests
In order to be compatible with KOTS, downgrade Velero to 1.10.
This removes some features from the Velero collector, but unblocks KOTS from being able
to import Troubleshoot.
We should be wary of updating Velero in the future to prevent this recurring.
sc-98475
* Add workaround for EKS version string
The EKS version string returned is not semver compliant. To work around this, we remove
the suffix for version strings that contain -eks-.
Fixes#1441
* Add parsing version test cases
* Rename function
---------
Co-authored-by: Evans Mungai <evans@replicated.com>
* 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
* fix(collector): Let pgx library parse TLS parameters
This allows the collector to respect the sslmode parameters
Fix: #1163
* Add comment
* Improve postgres collector test
* fix: missing omitempty on 2 of the new fields
* fix: Rename TS_WORKSPACE_DIR to TS_OUTPUT_DIR
---------
Co-authored-by: Evans Mungai <evans@replicated.com>
* feat: save cmd run output
* chore: schema changes
* chore: example hostCollector
* chore: add log messages to key actions
* fix: correctly inherit all parent env by default
* chore: do not save input file
the user invokes the input already got the input but those content could be sensitive to another user who received this bundle
* test: unit test for host run
* revert: "chore: do not save input file"
This reverts commit 6af77ad1ce.
that commit is wrong
* chore: fix log msg and example yaml
* Ensure child cmd runs in its own working dir
* Check filename for slashes not content
* Update logging
* Add using relative path files as commands
---------
Co-authored-by: Evans Mungai <evans@replicated.com>
* feat: add velero analyzer (#806)
* updated schema
* analyzer without collector
* tests
* covers deprecated Restic repository type
* velero version from deployment image to check deprecated type
* read for both velero pod kinds (velero*, node-agent*)
---------
Signed-off-by: Archit Sharma <archit@pm.me>
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)