Files
open-cluster-management/pkg/cmd/hub/controller.go
Jian Qiu aacb7b4293 Add basic cmd and pkg for regitstration controller/agent
This is to add leader election, healthz, metrics and event
2020-04-01 16:02:45 +08:00

21 lines
496 B
Go

package hub
import (
"github.com/spf13/cobra"
"github.com/openshift/library-go/pkg/controller/controllercmd"
"github.com/open-cluster-management/registration/pkg/hub"
"github.com/open-cluster-management/registration/pkg/version"
)
func NewController() *cobra.Command {
cmd := controllercmd.
NewControllerCommandConfig("controller", version.Get(), hub.RunControllerManager).
NewCommand()
cmd.Use = "controller"
cmd.Short = "Start the Cluster Registration Controller"
return cmd
}