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)
* 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
* stashing changes
* split filesystem collector into fio and legacy functions
* read fio results into analyzer
* remove test script
* update go.mod
* remove old notes
* go mod tidy
* fix up go.mod
* fix up go.mod
* refactor tests for fio
* make schemas
* remove local scripts
* local watch script for building troubleshoot
* document watch script
* fix var names
* handle errors if run as non-root
* go mod tidy
* use String interface
* collector happy path test
* invalid filesize
* invalid filesize
* tests
* remove old code
* remove old init function
* let actions tests run this
* clean up tests
* go mod tidy
* remove duplicated type declaration
* remove old file create code
* Document additional go tool profiling flags
* Add a regex cache to avoid compiling regular expressions all the time
* Reduce max buffer capacity
* Prefer bytes to strings
Strings are immutable and hence we need to create a new one
all the time when operation on them
* Some more changes
* More bytes
* Use writer.Write instead of fmt.FPrintf
* Clear regex cache when resetting redactors
* Logs errors when redactors error since they get swallowed
* Add an improvement comment
* Limit the number of goroutines spawned when redacting
* Minor improvement
* Write byte slices one at a time instead of concatenating them first
* Add a test for writeBytes
* Additional tests
* 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 regular expressions host anaylser
This anaylser is the same as the in-cluster text anaylser. You pass in
search expressions to find values in files collected in a bundle
* additional test assertion to check analyser warn
This adds JSONPath support to the json compare analyzer using
k8s.io/client-go/util/jsonpath implementation.
To preserve backwards compatibility a new attribute, `JsonPath, is added
to the compare analyzer as opposed to changing how `Path` works. Only
one should be set, but preference is given to `Path`, again to maintain
backwards compatibility.
As a convience for users, if the result of running the JSONPath
expression returns a single value, that value is unwrapped from its
enclosing array and used as the comparison with `Value`. This isn't
strictly compatible with how JSONPath works (all results are wrapped in
an array), but it's easier for end users who are expecting a single
result from their JSONPath expression.
* 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
* 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