* Auto-collectors: foundational discovery, image metadata, CLI integration; reset PRD markers
* Address PR review feedback
- Implement missing namespace exclude patterns functionality
- Fix image facts collector to use empty Data field instead of static string
- Correct APIVersion to use troubleshoot.sh/v1beta2 consistently
* Fix bug bot issues: API parsing, EOF error, and API group corrections
- Fix RBAC API parsing errors in rbac_checker.go (getAPIGroup/getAPIVersion functions)
- Fix FakeReader EOF error to use standard io.EOF instead of custom error
- Fix incorrect API group from troubleshoot.sh to troubleshoot.replicated.com in run.go
These changes address the issues identified by the bug bot and ensure proper
interface compliance and consistent API group usage.
* Fix multiple bug bot issues
- Fix RBAC API parsing errors in rbac_checker.go (getAPIGroup/getAPIVersion functions)
- Fix FakeReader EOF error to use standard io.EOF instead of custom error
- Fix incorrect API group from troubleshoot.sh to troubleshoot.replicated.com in run.go
- Fix image facts collector Data field to contain structured JSON instead of static strings
These changes address all issues identified by the bug bot and ensure proper
interface compliance, consistent API usage, and meaningful data fields.
* Update auto_discovery.go
* Fix TODO comments in Auto-collector section
Fixed 3 of 4 TODOs as requested in PR review:
1. pkg/collect/images/registry_client.go (line 46):
- Implement custom CA certificate loading
- Add x509 import and certificate parsing logic
- Enables image collection from private registries with custom CAs
2. cmd/troubleshoot/cli/diff.go (line 209):
- Implement bundle file count functionality
- Add tar/gzip imports and getFileCountFromBundle() function
- Properly counts files in support bundle archives (.gz/.tgz)
3. cmd/troubleshoot/cli/run.go (line 338):
- Replace TODO with clarifying comment about RemoteCollectors usage
- Confirmed RemoteCollectors are still actively used in preflights
The 4th TODO (diff.go line 196) is left as-is since it's explicitly marked
as Phase 4 future work (Support Bundle Differencing implementation).
Addresses PR review feedback about unimplemented TODO comments.
---------
Co-authored-by: Benjamin Yang <benjaminyang@Benjamins-MacBook-Pro.local>