// NewFederationCMServer creates a new hyperkube Server object that includes the
// description and flags.
func NewFederationCMServer() *Server {
	s := options.NewCMServer()

	hks := Server{
		SimpleUsage: "federation-controller-manager",
		Long:        "Controller manager for federation control plane. Manages federation service endpoints and controllers",
		Run: func(_ *Server, args []string) error {
			return app.Run(s)
		},
	}
	s.AddFlags(hks.Flags())
	return &hks
}
Example #2
0
func main() {
	s := options.NewCMServer()
	s.AddFlags(pflag.CommandLine)

	flag.InitFlags()
	logs.InitLogs()
	defer logs.FlushLogs()

	verflag.PrintAndExitIfRequested()

	if err := app.Run(s); err != nil {
		fmt.Fprintf(os.Stderr, "%v\n", err)
		os.Exit(1)
	}
}
Example #3
0
func main() {
	runtime.GOMAXPROCS(runtime.NumCPU())
	s := options.NewCMServer()
	s.AddFlags(pflag.CommandLine)

	flag.InitFlags()
	util.InitLogs()
	defer util.FlushLogs()

	verflag.PrintAndExitIfRequested()

	if err := app.Run(s); err != nil {
		fmt.Fprintf(os.Stderr, "%v\n", err)
		os.Exit(1)
	}
}