troubleshoot icon indicating copy to clipboard operation
troubleshoot copied to clipboard

Add a switch to `clusterResources` to enable collection from selected, or all, pods.

Open xavpaice opened this issue 3 years ago • 1 comments
trafficstars

Describe the rationale for the suggested feature.

Currently the clusterResources collects logs from containers for pods that have terminated with an error or are crash-looping.

There is a separate logs collector which selects other pods from which to store pod logs. This duplication is unnescessary and inefficient to maintain.

Describe the feature

Take the existing logs collector functionality and integrate that into the clusterResources collector.

Include all the switches implemented in https://troubleshoot.sh/docs/collect/logs/ and store the logs in the same directory structure as any other pod logs collected by clusterResources.

Describe alternatives you've considered

Maintaining duplicate code.

Additional context

See #744 for info on the logs collector storage location.

Once this change is merged, the content of the clusterResources collector duplicates the logs collector entirely, and we should deprecate the logs collector.

xavpaice avatar Sep 28 '22 06:09 xavpaice

This task needs some review, given that the logs collector in #744 will potentially reduce the need for this change.

xavpaice avatar Oct 13 '22 05:10 xavpaice

no longer required, closing

xavpaice avatar Apr 27 '23 20:04 xavpaice