Skip to content

Commit b2c3280

Browse files
committed
EL 20220901 - Implement new type for #682
1 parent cdf4d73 commit b2c3280

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

config/samples/troubleshoot_v1beta2_collector.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ kind: Collector
33
metadata:
44
name: collector-sample
55
spec:
6+
uri: https://raw.githubusercontent.com/replicatedhq/troubleshoot-specs/main/in-cluster/default.yaml
67
collectors:
78
- clusterInfo: {}
89
- clusterResources: {}

pkg/apis/troubleshoot/v1beta2/supportbundle_types.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ type SupportBundleSpec struct {
2727
HostCollectors []*HostCollect `json:"hostCollectors,omitempty" yaml:"hostCollectors,omitempty"`
2828
Analyzers []*Analyze `json:"analyzers,omitempty" yaml:"analyzers,omitempty"`
2929
HostAnalyzers []*HostAnalyze `json:"hostAnalyzers,omitempty" yaml:"hostAnalyzers,omitempty"`
30+
// Uri defines the location of the spec file that needs to be used. This is optional and can be
31+
// either a secret, url or spec yaml file.
32+
// When presented with a spec document that contains a URI, if that spec is one of the specs provided
33+
// on the command line or initial call to Troubleshoot, attempt to collect a replacement spec from that URI.
34+
// If successful, it will replace the entire spec with the one downloaded.
35+
// If unsuccessful, log the error and use the spec provided.
36+
Uri string `json:"uri,omitempty" yaml:"uri,omitempty"`
3037
}
3138

3239
// SupportBundleStatus defines the observed state of SupportBundle

0 commit comments

Comments
 (0)