// NewLandscaperServiceWebhooksCommand creates a new command for the landscaper service webhooks server
NewLandscaperServiceWebhooksCommand creates a new command for the landscaper service webhooks server
// NewLandscaperServiceWebhooksCommand creates a new command for the landscaper service webhooks server
func NewLandscaperServiceWebhooksCommand(ctx context.Context) *cobra.Command {
	options := NewOptions()
	cmd := &cobra.Command{
		Use:   "landscaper-service-webhooks",
		Short: "Landscaper Service webhooks serves the landscaper service validation, mutating and defaulting webhooks.",
		Run: func(cmd *cobra.Command, args []string) {
			if err := options.Complete(); err != nil {
				fmt.Print(err)
				os.Exit(1)
			}
			if err := options.run(ctx); err != nil {
				options.log.Error(err, "unable to run landscaper service webhooks server")
				os.Exit(1)
			}
		},
	}
	options.AddFlags(cmd.Flags())
	return cmd
}
func NewLandscaperServiceWebhooksCommand ( ctx context . Context ) * cobra . Command { options := NewOptions ( ) cmd := & cobra . Command { Use : " " , Short : " " , Run : func ( cmd * cobra . Command , args [ ] string ) { if err := options . Complete ( ) ; err != nil { fmt . Print ( err ) os . Exit ( 1 ) } if err := options . run ( ctx ) ; err != nil { options . log . Error ( err , " " ) os . Exit ( 1 ) } } , } options . AddFlags ( cmd . Flags ( ) ) return cmd }
NewLandscaperServiceWebhooksCommand creates a new command for the landscaper service webhooks server
NewLandscaperServiceWebhooksCommand creates a new command for the landscaper service webhooks server