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

26 lines
485 B
Go

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