func (r *HarborCluster) ValidateUpdate(old runtime.Object) error {
	harborclusterlog.Info("validate update", "name", r.Name)
	return r.ValidateComponentKind(old)
}
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
package v1alpha1
import (
	"errors"
	"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 harborclusterlog = logf.Log.WithName("harborcluster-resource")
func (r *HarborCluster) SetupWebhookWithManager(mgr ctrl.Manager) error {
	return ctrl.NewWebhookManagedBy(mgr).
		For(r).
		Complete()
}
var _ webhook.Defaulter = &HarborCluster{}
func (r *HarborCluster) Default() {
	harborclusterlog.Info("default", "name", r.Name)
}
var _ webhook.Validator = &HarborCluster{}
func (r *HarborCluster) ValidateCreate() error {
	harborclusterlog.Info("validate create", "name", r.Name)
	return nil
}