troubleshoot
troubleshoot copied to clipboard
feature: CLI switch to disable or enable the auto add of clusterResources collector
Problem we're trying to solve
When running preflight checks, there are circumstances when we have no analyzers in the spec that make use of data collected by clusterResources and clusterInfo, though we automatically add them to the collect phase regardless. This takes time, and therefore discourages the use of the preflight image in things such as init containers for applications.
In situations where preflight and/or support bundle runs and either doesn't make use of the data, or doesn't have the permissions to collect the data in any case, it would be good to speed up execution and skip those collectors entirely. This would also reduce the time take for redactors to execute, since there's significantly less file i/o with less data collected.
feature
Add a CLI switch --collect-cluster-resources, default to true, that disables the auto addition of clusterResources and clusterInfo from preflight, and support-bundle, execution.
This does not change the default behavior, and so is backward compatible.