Files
open-cluster-management/pkg/cmd/operator/hub.go
2022-01-10 14:34:50 +01:00

24 lines
628 B
Go

package operator
import (
"github.com/spf13/cobra"
"github.com/openshift/library-go/pkg/controller/controllercmd"
"open-cluster-management.io/registration-operator/pkg/operators/clustermanager"
"open-cluster-management.io/registration-operator/pkg/version"
)
// NewHubOperatorCmd generatee a command to start hub operator
func NewHubOperatorCmd() *cobra.Command {
options := clustermanager.Options{}
cmd := controllercmd.
NewControllerCommandConfig("clustermanager", version.Get(), options.RunClusterManagerOperator).
NewCommand()
cmd.Use = "hub"
cmd.Short = "Start the cluster manager operator"
return cmd
}