troubleshoot icon indicating copy to clipboard operation
troubleshoot copied to clipboard

feature: CLI switch to disable or enable the auto add of clusterResources collector

Open xavpaice opened this issue 2 years ago • 0 comments

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.

xavpaice avatar Jun 01 '23 04:06 xavpaice