-
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 (supportbundle): Add default collectors when expected #1418
fix (supportbundle): Add default collectors when expected #1418
Conversation
So this I expected Defaults added:
But this one I'm surprised by:
Is that latter an intentional choice or a side effect of how the object is created. I would prefer these both add defaults, it looks like they would. Wait this doesn't have defaults either?
So is there an intentional rule, if hostCollectors are added don't add default collectors? Is that the logic? |
I think this is what we did in the past to avoid any code paths that would try contacting a Kubernetes cluster if there were only host collectors/analyzers in the spec. As in we figured it was intentional that's the behavior you wanted it you didn't at least include an empty collector/analyzer property. |
According the test cases, I saw
just to confirm it will not have Defaults as follow, right?
|
Correct. Defaults will not be added. |
Yes, its intentional. Its code that was added a while back as commented in #1418 (comment) |
The logic in troubleshoot treats zero length lists the same as being absent for |
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.
I read this as a bugfix, making things behave as we originally intended.
Description, Motivation and Context
Ensure default collectors (
clusterInfo
andclusterResources
) are added by default whenever required when runningsupport-bundle
. Below are specs representing possible combinationsspec: {}
is present.spec
is not mandatory. This depicts the minimum spec one can create)collectors: []
is treated as if its absentFixes: #1417
Checklist
Does this PR introduce a breaking change?