-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(support-bundle): default in-cluster collectors in host support bundle #1394
fix(support-bundle): default in-cluster collectors in host support bundle #1394
Conversation
…ndle Ensure cluster-resources and cluster-info collectors are present only when a support bundle spec contains in-cluster collectors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure why this is failing tests, but it is?
* Improve error messages * Util function appending elements to a nil slice that allows adding specs to an empty slice of collectors/analysers/redactors
840dca4
to
799c55a
Compare
Its a valid issue. I've fixed it in this commit. Essentially, a bug surfaced itself when collecting a support bundle using a spec like below apiVersion: troubleshoot.sh/v1beta2
kind: Collector
metadata:
name: collector-sample
spec:
collectors: [] Golang treats empty slices the same as nil slices when it comes to its built in functions such as |
@xavpaice tests have been fixed |
Description, Motivation and Context
Ensure cluster-resources and cluster-info collectors are present only when a support bundle spec contains in-cluster collectors.
If there is not running cluster,
support-bundle
logs an error like below which leads users to think that the support bundle was not generated. A follow-up PR will be created to fix that message.Fixes: #1393
Checklist
Does this PR introduce a breaking change?