INNER CODE UNIT · Go

main

gravitational/workshop · crd/controller/main.go:50

func main() {
	flag.Parse()
	logrus.StandardLogger().SetHooks(make(logrus.LevelHooks))
	logrus.SetFormatter(&logrus.TextFormatter{})
	logrus.SetOutput(os.Stderr)
	if debug {
		logrus.SetLevel(logrus.DebugLevel)
	}
	if err := run(); err != nil {
		logrus.WithError(err).Error("Controller exited with error.")
		os.Exit(255)
	}
}

func run() error {
	cfg, err := clientcmd.BuildConfigFromFlags(masterURL, kubeconfig)
	if err != nil {
		return trace.Wrap(err, "error building Kubernetes config")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…