MCPcopy
hub / github.com/vmware-tanzu/sonobuoy / runAggregator

Function runAggregator

cmd/sonobuoy/app/aggregator.go:62–86  ·  view source on GitHub ↗
(input *aggregatorInput)

Source from the content-addressed store, hash-verified

60}
61
62func runAggregator(input *aggregatorInput) error {
63 cfg, err := config.LoadConfig()
64 if err != nil {
65 return errors.Wrap(err, "error loading sonobuoy configuration")
66 }
67
68 kcfg, err := input.kubecfg.Get()
69 if err != nil {
70 return errors.Wrap(err, "getting kubeconfig")
71 }
72
73 // Run Discovery (gather API data, run plugins)
74 errcount := discovery.Run(kcfg, cfg)
75
76 if input.noExit {
77 logrus.Info("no-exit was specified, sonobuoy is now blocking")
78 select {}
79 }
80
81 if errcount > 0 {
82 return fmt.Errorf("%v errors encountered during execution", errcount)
83 }
84
85 return nil
86}

Callers 1

NewCmdAggregatorFunction · 0.85

Calls 3

LoadConfigFunction · 0.92
RunFunction · 0.92
GetMethod · 0.45

Tested by

no test coverage detected