mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-08-27 00:37:20 +00:00
* Add per-collector subcommands to the collect binary Add `collect http|postgres|mysql|mssql|redis` subcommands that run a single collector and print its native result JSON to stdout, so a collector can run inside a Pod via the troubleshoot image (e.g. as a runPod collector). Each has its own flags mapping to the collector's spec fields and its own help. The Kubernetes client (used only for TLS-from-Secret) is built to match the production preflight/support-bundle path (QPS/Burst/UserAgent). * Add clickhouse subcommand to the collect binary Add `collect clickhouse`, matching the other per-collector subcommands, so the clickhouse collector can run inside a Pod via the troubleshoot image (e.g. as a runPod collector). Same flags as the other database collectors (--uri + --tls-*). * Make global flags work on the collect subcommands Register --debug and the Kubernetes flags (--kubeconfig, --context, etc.) as persistent flags, and move the shared setup to PersistentPreRun/PersistentPostRun, so the per-collector subcommands inherit the global flags and run the same logger/profiling setup as `collect [url]`. Previously these were local flags with setup in PreRun, so subcommands rejected --debug/--kubeconfig and ignored the setup.