@@ -68,19 +68,6 @@ func runTroubleshoot(v *viper.Viper, arg []string) error {
6868 })
6969 }
7070
71- // collectorContent, err := supportbundle.LoadSupportBundleSpec(arg)
72- // if err != nil {
73- // return errors.Wrap(err, "failed to load collector spec")
74- // }
75- //
76- // multidocs := strings.Split(string(collectorContent), "\n---\n")
77- //
78- // // we support both raw collector kinds and supportbundle kinds here
79- // supportBundle, err := supportbundle.ParseSupportBundleFromDoc([]byte(multidocs[0]))
80- // if err != nil {
81- // return errors.Wrap(err, "failed to parse collector")
82- // }
83-
8471 var mainBundle * troubleshootv1beta2.SupportBundle
8572
8673 troubleshootclientsetscheme .AddToScheme (scheme .Scheme )
@@ -101,7 +88,7 @@ func runTroubleshoot(v *viper.Viper, arg []string) error {
10188 if i == 0 {
10289 mainBundle = supportBundle
10390 } else {
104- mainBundle .ConcatSpec (supportBundle )
91+ mainBundle = supportbundle .ConcatSpec (mainBundle , supportBundle )
10592 }
10693
10794 for i , additionalDoc := range multidocs {
@@ -135,25 +122,6 @@ func runTroubleshoot(v *viper.Viper, arg []string) error {
135122 }
136123 }
137124
138- // for i, additionalDoc := range multidocs {
139- // if i == 0 {
140- // continue
141- // }
142- // additionalDoc, err := docrewrite.ConvertToV1Beta2([]byte(additionalDoc))
143- // if err != nil {
144- // return errors.Wrap(err, "failed to convert to v1beta2")
145- // }
146- // obj, _, err := decode(additionalDoc, nil, nil)
147- // if err != nil {
148- // return errors.Wrapf(err, "failed to parse additional doc %d", i)
149- // }
150- // multidocRedactors, ok := obj.(*troubleshootv1beta2.Redactor)
151- // if !ok {
152- // continue
153- // }
154- // additionalRedactors.Spec.Redactors = append(additionalRedactors.Spec.Redactors, multidocRedactors.Spec.Redactors...)
155- // }
156-
157125 var collectorCB func (chan interface {}, string )
158126 progressChan := make (chan interface {}) // non-zero buffer can result in missed messages
159127 finishedCh := make (chan bool , 1 )
0 commit comments