* Uses secrets from cluster
* updated gitignore to stop ignoring needed files
* Delete specs.go.bak
* make fmt
* added preflight to generic loader
* Tells user to run in cluster if using secretKeyRef
* Update loader.go
* Update loader.go
* feat: Handle failure to load cluster specs gracefully in support-bundle command
In some scenarios, we don't want to fail when unable to load specs from
the cluster. This is particularly useful when:
- A host support bundle is available on disk.
- There are specs defined in the cluster.
- The cluster is malfunctioning or inaccessible.
- We still need to generate a support bundle using only the host specs.
- This change allows users to generate a support bundle even if the
embedded cluster is not functioning properly, making the process more
resilient.
The primary motivation is to introduce a new command:
```
./embedded-cluster support-bundle
```
When executed, this command attempts to collect both host and cluster
specs. However, if the embedded cluster is broken or unavailable, the
command will skip loading the cluster specs and focus on the host,
ensuring that users can still gather critical information without
interruption.
* chore: use fmt printf instead of klog
* Update internal/specs/specs.go
Co-authored-by: Evans Mungai <evans@replicated.com>
---------
Co-authored-by: Evans Mungai <evans@replicated.com>
* 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