Skip to content

Commit

Permalink
fix save node_list.json fail
Browse files Browse the repository at this point in the history
  • Loading branch information
DexterYan committed Nov 11, 2024
1 parent 0e16a65 commit 76ad948
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/supportbundle/collect.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ func runRemoteHostCollectors(ctx context.Context, hostCollectors []*troubleshoot

var eg errgroup.Group

if err := saveNodeList(opts, bundlePath); err != nil {
if err := saveNodeList(output, opts, bundlePath); err != nil {
return nil, err
}

Expand Down Expand Up @@ -609,9 +609,7 @@ func waitForDS(ctx context.Context, clientset kubernetes.Interface, ds *appsv1.D
}
}

func saveNodeList(opts SupportBundleCreateOpts, bundlePath string) error {
result := make(collect.CollectorResult)

func saveNodeList(result collect.CollectorResult, opts SupportBundleCreateOpts, bundlePath string) error {
clientset, err := kubernetes.NewForConfig(opts.KubernetesRestConfig)
if err != nil {
return errors.Wrap(err, "failed to create kubernetes clientset to run host collectors in pod")
Expand Down

0 comments on commit 76ad948

Please sign in to comment.