func (r *Fetcher) ValidateDelete() error {
	fetcherlog.Info("validate delete", "name", r.Name)
	return nil
}
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
package v1alpha1
import (
	"fmt"
	"k8s.io/apimachinery/pkg/runtime"
	ctrl "sigs.k8s.io/controller-runtime"
	logf "sigs.k8s.io/controller-runtime/pkg/log"
	"sigs.k8s.io/controller-runtime/pkg/webhook"
)
var fetcherlog = logf.Log.WithName("fetcher-resource")
func (r *Fetcher) SetupWebhookWithManager(mgr ctrl.Manager) error {
	return ctrl.NewWebhookManagedBy(mgr).
		For(r).
		Complete()
}
var _ webhook.Defaulter = &Fetcher{}
func (r *Fetcher) Default() {
	fetcherlog.Info("default", "name", r.Name)
	if r.Spec.ClusterName == "" {
		r.Spec.ClusterName = r.Name
	}
}
var _ webhook.Validator = &Fetcher{}
func (r *Fetcher) ValidateCreate() error {
	fetcherlog.Info("validate create", "name", r.Name)
	return r.validate()
}
func (r *Fetcher) ValidateUpdate(old runtime.Object) error {
	fetcherlog.Info("validate update", "name", r.Name)
	return r.validate()
}