func verbToAPIVariant(verbRaw string) admissionregv1.OperationType {
	switch strings.ToLower(verbRaw) {
	case strings.ToLower(string(admissionregv1.Create)):
		return admissionregv1.Create
	case strings.ToLower(string(admissionregv1.Update)):
		return admissionregv1.Update
	case strings.ToLower(string(admissionregv1.Delete)):
		return admissionregv1.Delete
	case strings.ToLower(string(admissionregv1.Connect)):
		return admissionregv1.Connect
	case strings.ToLower(string(admissionregv1.OperationAll)):
		return admissionregv1.OperationAll
	default:
		return admissionregv1.OperationType(verbRaw)
	}
}
verbToAPIVariant converts a marker's verb to the proper value for the API.
Unrecognized verbs are passed through.
package webhook
import (
	"fmt"
	"strings"
	admissionregv1 "k8s.io/api/admissionregistration/v1"
	"k8s.io/apimachinery/pkg/runtime/schema"
	"k8s.io/apimachinery/pkg/util/sets"
	"sigs.k8s.io/controller-tools/pkg/genall"
	"sigs.k8s.io/controller-tools/pkg/markers"
)
const (
	v1                    = "v1"
	defaultWebhookVersion = v1
)
var (
	ConfigDefinition = markers.Must(markers.MakeDefinition("kubebuilder:webhook", markers.DescribesPackage, Config{}))
)
func supportedWebhookVersions() []string {
	return []string{defaultWebhookVersion}
}
type Config struct {
	Mutating bool
	FailurePolicy string
	MatchPolicy string `marker:",optional"`
	SideEffects string `marker:",optional"`
	Groups []string
	Resources []string
	Verbs []string
	Versions []string
	Name string
	Path string
	WebhookVersions []string `marker:"webhookVersions,optional"`
	AdmissionReviewVersions []string `marker:"admissionReviewVersions"`
}