INNER CODE UNIT · Go
main
kuberhealthy/kuberhealthy · cmd/kuberhealthy/main.go:49
func main() {
// root context of Kuberhealthy. Revoke this and everything shuts down.
ctx, ctxCancel := context.WithCancel(context.Background())
defer ctx.Done()
// Initial setup before starting Kuberhealthy. Loading, parsing, and setting flags, config values and environment vars.
err := setUp()
if err != nil {
log.Fatalln("startup: error setting up kuberhealthy:", err)
}
// setup a channel to capture when a shutdown is done
doneChan := make(chan struct{})
// Build the Kubernetes config and clients once for reuse
Globals.kubeConfig, err = ctrl.GetConfig()
if err != nil {