Files
open-cluster-management/pkg/cmd/webhook/registration.go
2023-08-21 00:03:58 -02:30

25 lines
460 B
Go

package webhook
import (
"github.com/spf13/cobra"
"open-cluster-management.io/ocm/pkg/registration/webhook"
)
func NewRegistrationWebhook() *cobra.Command {
ops := webhook.NewOptions()
cmd := &cobra.Command{
Use: "webhook-server",
Short: "Start the registration webhook server",
RunE: func(c *cobra.Command, args []string) error {
err := ops.RunWebhookServer()
return err
},
}
flags := cmd.Flags()
ops.AddFlags(flags)
return cmd
}