replicatedhq / troubleshoot

Preflight Checks and Support Bundles Framework for Kubernetes Applications
https://troubleshoot.sh
Apache License 2.0
543 stars 92 forks source link

fix: Parse v1beta1 troubleshoot specs when using loader API #1501

Closed banjoh closed 5 months ago

banjoh commented 5 months ago

Description, Motivation and Context

Parsing troubleshoot.replicated.com/v1beta1 specs in troubleshoot fails when collecting support bundles.

spec.yaml

kind: Collector
apiVersion: troubleshoot.replicated.com/v1beta1
spec:
  collectors:
  - clusterInfo: {}

run before fix

[evans] $ support-bundle spec.yaml --v=2
I0311 17:40:41.663099   48425 loader.go:203] Skip loading "Collector" kind
I0311 17:40:41.663120   48425 loader.go:258] No troubleshoot specs were loaded
...

run after fix

[evans] $ support-bundle spec.yaml --v=2
I0311 17:43:08.129636   48866 loader.go:260] Loaded troubleshoot specs successfully

I0311 17:43:08.129903   48866 supportbundle.go:70] Support bundle created in temporary directory: /var/folders/19/bp6c9chj0sgcpcxmxxl69s040000gn/T/supportbundle492182392
....

Fixes: #1502

Checklist

Does this PR introduce a breaking change?