Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,27 +360,27 @@ func main() {
}

func setupVAPIControllers(ctx context.Context, controllerCtx *capvcontext.ControllerManagerContext, mgr ctrlmgr.Manager, clusterCache clustercache.ClusterCache) error {
if err := (&webhooks.VSphereClusterTemplateWebhook{}).SetupWebhookWithManager(mgr); err != nil {
if err := (&webhooks.VSphereClusterTemplate{}).SetupWebhookWithManager(mgr); err != nil {
return err
}

if err := (&webhooks.VSphereMachineWebhook{}).SetupWebhookWithManager(mgr); err != nil {
if err := (&webhooks.VSphereMachine{}).SetupWebhookWithManager(mgr); err != nil {
return err
}

if err := (&webhooks.VSphereMachineTemplateWebhook{}).SetupWebhookWithManager(mgr); err != nil {
if err := (&webhooks.VSphereMachineTemplate{}).SetupWebhookWithManager(mgr); err != nil {
return err
}

if err := (&webhooks.VSphereVMWebhook{}).SetupWebhookWithManager(mgr); err != nil {
if err := (&webhooks.VSphereVM{}).SetupWebhookWithManager(mgr); err != nil {
return err
}

if err := (&webhooks.VSphereDeploymentZoneWebhook{}).SetupWebhookWithManager(mgr); err != nil {
if err := (&webhooks.VSphereDeploymentZone{}).SetupWebhookWithManager(mgr); err != nil {
return err
}

if err := (&webhooks.VSphereFailureDomainWebhook{}).SetupWebhookWithManager(mgr); err != nil {
if err := (&webhooks.VSphereFailureDomain{}).SetupWebhookWithManager(mgr); err != nil {
return err
}

Expand All @@ -401,10 +401,10 @@ func setupVAPIControllers(ctx context.Context, controllerCtx *capvcontext.Contro
}

func setupSupervisorControllers(ctx context.Context, controllerCtx *capvcontext.ControllerManagerContext, mgr ctrlmgr.Manager, clusterCache clustercache.ClusterCache) error {
if err := (&vmwarewebhooks.VSphereMachineTemplateWebhook{}).SetupWebhookWithManager(mgr); err != nil {
if err := (&vmwarewebhooks.VSphereMachineTemplate{}).SetupWebhookWithManager(mgr); err != nil {
return err
}
if err := (&vmwarewebhooks.VSphereMachineWebhook{}).SetupWebhookWithManager(mgr); err != nil {
if err := (&vmwarewebhooks.VSphereMachine{}).SetupWebhookWithManager(mgr); err != nil {
return err
}
if err := controllers.AddClusterControllerToManager(ctx, controllerCtx, mgr, true, concurrency(vSphereClusterConcurrency)); err != nil {
Expand Down
36 changes: 18 additions & 18 deletions webhooks/alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,50 +22,50 @@ import (
"sigs.k8s.io/cluster-api-provider-vsphere/internal/webhooks"
)

// VSphereClusterTemplateWebhook implements a validation and defaulting webhook for VSphereClusterTemplate.
type VSphereClusterTemplateWebhook struct{}
// VSphereClusterTemplate implements a validation webhook for VSphereClusterTemplate.
type VSphereClusterTemplate struct{}

// SetupWebhookWithManager sets up VSphereClusterTemplate webhooks.
func (webhook *VSphereClusterTemplateWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error {
func (webhook *VSphereClusterTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error {
return (&webhooks.VSphereClusterTemplateWebhook{}).SetupWebhookWithManager(mgr)
}

// VSphereDeploymentZoneWebhook implements a validation and defaulting webhook for VSphereDeploymentZone.
type VSphereDeploymentZoneWebhook struct{}
// VSphereDeploymentZone implements a defaulting webhook for VSphereDeploymentZone.
type VSphereDeploymentZone struct{}

// SetupWebhookWithManager sets up VSphereDeploymentZone webhooks.
func (webhook *VSphereDeploymentZoneWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error {
func (webhook *VSphereDeploymentZone) SetupWebhookWithManager(mgr ctrl.Manager) error {
return (&webhooks.VSphereDeploymentZoneWebhook{}).SetupWebhookWithManager(mgr)
}

// VSphereFailureDomainWebhook implements a validation and defaulting webhook for VSphereFailureDomain.
type VSphereFailureDomainWebhook struct{}
// VSphereFailureDomain implements a validation and defaulting webhook for VSphereFailureDomain.
type VSphereFailureDomain struct{}

// SetupWebhookWithManager sets up VSphereFailureDomain webhooks.
func (webhook *VSphereFailureDomainWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error {
func (webhook *VSphereFailureDomain) SetupWebhookWithManager(mgr ctrl.Manager) error {
return (&webhooks.VSphereFailureDomainWebhook{}).SetupWebhookWithManager(mgr)
}

// VSphereMachineWebhook implements a validation and defaulting webhook for VSphereMachine.
type VSphereMachineWebhook struct{}
// VSphereMachine implements a validation and defaulting webhook for VSphereMachine.
type VSphereMachine struct{}

// SetupWebhookWithManager sets up VSphereMachine webhooks.
func (webhook *VSphereMachineWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error {
func (webhook *VSphereMachine) SetupWebhookWithManager(mgr ctrl.Manager) error {
return (&webhooks.VSphereMachineWebhook{}).SetupWebhookWithManager(mgr)
}

// VSphereMachineTemplateWebhook implements a validation and defaulting webhook for VSphereMachineTemplate.
type VSphereMachineTemplateWebhook struct{}
// VSphereMachineTemplate implements a validation webhook for VSphereMachineTemplate.
type VSphereMachineTemplate struct{}

// SetupWebhookWithManager sets up VSphereMachineTemplate webhooks.
func (webhook *VSphereMachineTemplateWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error {
func (webhook *VSphereMachineTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error {
return (&webhooks.VSphereMachineTemplateWebhook{}).SetupWebhookWithManager(mgr)
}

// VSphereVMWebhook implements a validation and defaulting webhook for VSphereVM.
type VSphereVMWebhook struct{}
// VSphereVM implements a validation and defaulting webhook for VSphereVM.
type VSphereVM struct{}

// SetupWebhookWithManager sets up VSphereVM webhooks.
func (webhook *VSphereVMWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error {
func (webhook *VSphereVM) SetupWebhookWithManager(mgr ctrl.Manager) error {
return (&webhooks.VSphereVMWebhook{}).SetupWebhookWithManager(mgr)
}
12 changes: 6 additions & 6 deletions webhooks/vmware/alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ import (
"sigs.k8s.io/cluster-api-provider-vsphere/internal/webhooks/vmware"
)

// VSphereMachineWebhook implements a validation and defaulting webhook for VSphereMachine.
type VSphereMachineWebhook struct{}
// VSphereMachine implements a validation and defaulting webhook for VSphereMachine.
type VSphereMachine struct{}

// SetupWebhookWithManager sets up VSphereMachine webhooks.
func (webhook *VSphereMachineWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error {
func (webhook *VSphereMachine) SetupWebhookWithManager(mgr ctrl.Manager) error {
return (&vmware.VSphereMachineWebhook{}).SetupWebhookWithManager(mgr)
}

// VSphereMachineTemplateWebhook implements a validation and defaulting webhook for VSphereMachineTemplate.
type VSphereMachineTemplateWebhook struct{}
// VSphereMachineTemplate implements a validation webhook for VSphereMachineTemplate.
type VSphereMachineTemplate struct{}

// SetupWebhookWithManager sets up VSphereMachineTemplate webhooks.
func (webhook *VSphereMachineTemplateWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error {
func (webhook *VSphereMachineTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error {
return (&vmware.VSphereMachineTemplateWebhook{}).SetupWebhookWithManager(mgr)
}
Loading