mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-05-09 18:57:35 +00:00
23 lines
577 B
Go
23 lines
577 B
Go
package spoke
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
|
|
"github.com/openshift/library-go/pkg/controller/controllercmd"
|
|
|
|
"github.com/open-cluster-management/registration/pkg/spoke"
|
|
"github.com/open-cluster-management/registration/pkg/version"
|
|
)
|
|
|
|
func NewAgent() *cobra.Command {
|
|
agentOptions := spoke.NewSpokeAgentOptions()
|
|
cmd := controllercmd.
|
|
NewControllerCommandConfig("registration-agent", version.Get(), agentOptions.RunSpokeAgent).
|
|
NewCommand()
|
|
cmd.Use = "agent"
|
|
cmd.Short = "Start the Cluster Registration Agent"
|
|
|
|
agentOptions.AddFlags(cmd.Flags())
|
|
return cmd
|
|
}
|