Files
open-cluster-management/pkg/cmd/operator/operator.go
2020-04-29 15:29:31 +08:00

22 lines
542 B
Go

package operator
import (
"github.com/spf13/cobra"
"github.com/openshift/library-go/pkg/controller/controllercmd"
"github.com/open-cluster-management/nucleus/pkg/operators"
"github.com/open-cluster-management/nucleus/pkg/version"
)
// NewOperator generatee a command to start workload agent
func NewOperatorCmd() *cobra.Command {
cmd := controllercmd.
NewControllerCommandConfig("operator", version.Get(), operators.RunNucleusOperator).
NewCommand()
cmd.Use = "operator"
cmd.Short = "Start the nucleus operator"
return cmd
}