Skip to content

Commit c355917

Browse files
authored
Merge pull request #3466 from dmvolod/pr-3462-backport-release-1.11
[release-1.11] 🌱 Fix web-hook structure names and descriptions
2 parents 8fdc284 + f01f4e8 commit c355917

File tree

3 files changed

+32
-32
lines changed

3 files changed

+32
-32
lines changed

main.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -351,27 +351,27 @@ func main() {
351351
}
352352

353353
func setupVAPIControllers(ctx context.Context, controllerCtx *capvcontext.ControllerManagerContext, mgr ctrlmgr.Manager, tracker *remote.ClusterCacheTracker) error {
354-
if err := (&webhooks.VSphereClusterTemplateWebhook{}).SetupWebhookWithManager(mgr); err != nil {
354+
if err := (&webhooks.VSphereClusterTemplate{}).SetupWebhookWithManager(mgr); err != nil {
355355
return err
356356
}
357357

358-
if err := (&webhooks.VSphereMachineWebhook{}).SetupWebhookWithManager(mgr); err != nil {
358+
if err := (&webhooks.VSphereMachine{}).SetupWebhookWithManager(mgr); err != nil {
359359
return err
360360
}
361361

362-
if err := (&webhooks.VSphereMachineTemplateWebhook{}).SetupWebhookWithManager(mgr); err != nil {
362+
if err := (&webhooks.VSphereMachineTemplate{}).SetupWebhookWithManager(mgr); err != nil {
363363
return err
364364
}
365365

366-
if err := (&webhooks.VSphereVMWebhook{}).SetupWebhookWithManager(mgr); err != nil {
366+
if err := (&webhooks.VSphereVM{}).SetupWebhookWithManager(mgr); err != nil {
367367
return err
368368
}
369369

370-
if err := (&webhooks.VSphereDeploymentZoneWebhook{}).SetupWebhookWithManager(mgr); err != nil {
370+
if err := (&webhooks.VSphereDeploymentZone{}).SetupWebhookWithManager(mgr); err != nil {
371371
return err
372372
}
373373

374-
if err := (&webhooks.VSphereFailureDomainWebhook{}).SetupWebhookWithManager(mgr); err != nil {
374+
if err := (&webhooks.VSphereFailureDomain{}).SetupWebhookWithManager(mgr); err != nil {
375375
return err
376376
}
377377

@@ -392,10 +392,10 @@ func setupVAPIControllers(ctx context.Context, controllerCtx *capvcontext.Contro
392392
}
393393

394394
func setupSupervisorControllers(ctx context.Context, controllerCtx *capvcontext.ControllerManagerContext, mgr ctrlmgr.Manager, tracker *remote.ClusterCacheTracker) error {
395-
if err := (&vmwarewebhooks.VSphereMachineTemplateWebhook{}).SetupWebhookWithManager(mgr); err != nil {
395+
if err := (&vmwarewebhooks.VSphereMachineTemplate{}).SetupWebhookWithManager(mgr); err != nil {
396396
return err
397397
}
398-
if err := (&vmwarewebhooks.VSphereMachineWebhook{}).SetupWebhookWithManager(mgr); err != nil {
398+
if err := (&vmwarewebhooks.VSphereMachine{}).SetupWebhookWithManager(mgr); err != nil {
399399
return err
400400
}
401401
if err := controllers.AddClusterControllerToManager(ctx, controllerCtx, mgr, true, concurrency(vSphereClusterConcurrency)); err != nil {

webhooks/alias.go

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,50 +22,50 @@ import (
2222
"sigs.k8s.io/cluster-api-provider-vsphere/internal/webhooks"
2323
)
2424

25-
// VSphereClusterTemplateWebhook implements a validation and defaulting webhook for VSphereClusterTemplate.
26-
type VSphereClusterTemplateWebhook struct{}
25+
// VSphereClusterTemplate implements a validation webhook for VSphereClusterTemplate.
26+
type VSphereClusterTemplate struct{}
2727

2828
// SetupWebhookWithManager sets up VSphereClusterTemplate webhooks.
29-
func (webhook *VSphereClusterTemplateWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error {
29+
func (webhook *VSphereClusterTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error {
3030
return (&webhooks.VSphereClusterTemplateWebhook{}).SetupWebhookWithManager(mgr)
3131
}
3232

33-
// VSphereDeploymentZoneWebhook implements a validation and defaulting webhook for VSphereDeploymentZone.
34-
type VSphereDeploymentZoneWebhook struct{}
33+
// VSphereDeploymentZone implements a defaulting webhook for VSphereDeploymentZone.
34+
type VSphereDeploymentZone struct{}
3535

3636
// SetupWebhookWithManager sets up VSphereDeploymentZone webhooks.
37-
func (webhook *VSphereDeploymentZoneWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error {
37+
func (webhook *VSphereDeploymentZone) SetupWebhookWithManager(mgr ctrl.Manager) error {
3838
return (&webhooks.VSphereDeploymentZoneWebhook{}).SetupWebhookWithManager(mgr)
3939
}
4040

41-
// VSphereFailureDomainWebhook implements a validation and defaulting webhook for VSphereFailureDomain.
42-
type VSphereFailureDomainWebhook struct{}
41+
// VSphereFailureDomain implements a validation and defaulting webhook for VSphereFailureDomain.
42+
type VSphereFailureDomain struct{}
4343

4444
// SetupWebhookWithManager sets up VSphereFailureDomain webhooks.
45-
func (webhook *VSphereFailureDomainWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error {
45+
func (webhook *VSphereFailureDomain) SetupWebhookWithManager(mgr ctrl.Manager) error {
4646
return (&webhooks.VSphereFailureDomainWebhook{}).SetupWebhookWithManager(mgr)
4747
}
4848

49-
// VSphereMachineWebhook implements a validation and defaulting webhook for VSphereMachine.
50-
type VSphereMachineWebhook struct{}
49+
// VSphereMachine implements a validation and defaulting webhook for VSphereMachine.
50+
type VSphereMachine struct{}
5151

5252
// SetupWebhookWithManager sets up VSphereMachine webhooks.
53-
func (webhook *VSphereMachineWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error {
53+
func (webhook *VSphereMachine) SetupWebhookWithManager(mgr ctrl.Manager) error {
5454
return (&webhooks.VSphereMachineWebhook{}).SetupWebhookWithManager(mgr)
5555
}
5656

57-
// VSphereMachineTemplateWebhook implements a validation and defaulting webhook for VSphereMachineTemplate.
58-
type VSphereMachineTemplateWebhook struct{}
57+
// VSphereMachineTemplate implements a validation webhook for VSphereMachineTemplate.
58+
type VSphereMachineTemplate struct{}
5959

6060
// SetupWebhookWithManager sets up VSphereMachineTemplate webhooks.
61-
func (webhook *VSphereMachineTemplateWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error {
61+
func (webhook *VSphereMachineTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error {
6262
return (&webhooks.VSphereMachineTemplateWebhook{}).SetupWebhookWithManager(mgr)
6363
}
6464

65-
// VSphereVMWebhook implements a validation and defaulting webhook for VSphereVM.
66-
type VSphereVMWebhook struct{}
65+
// VSphereVM implements a validation and defaulting webhook for VSphereVM.
66+
type VSphereVM struct{}
6767

6868
// SetupWebhookWithManager sets up VSphereVM webhooks.
69-
func (webhook *VSphereVMWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error {
69+
func (webhook *VSphereVM) SetupWebhookWithManager(mgr ctrl.Manager) error {
7070
return (&webhooks.VSphereVMWebhook{}).SetupWebhookWithManager(mgr)
7171
}

webhooks/vmware/alias.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@ import (
2222
"sigs.k8s.io/cluster-api-provider-vsphere/internal/webhooks/vmware"
2323
)
2424

25-
// VSphereMachineWebhook implements a validation and defaulting webhook for VSphereMachine.
26-
type VSphereMachineWebhook struct{}
25+
// VSphereMachine implements a validation and defaulting webhook for VSphereMachine.
26+
type VSphereMachine struct{}
2727

2828
// SetupWebhookWithManager sets up VSphereMachine webhooks.
29-
func (webhook *VSphereMachineWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error {
29+
func (webhook *VSphereMachine) SetupWebhookWithManager(mgr ctrl.Manager) error {
3030
return (&vmware.VSphereMachineWebhook{}).SetupWebhookWithManager(mgr)
3131
}
3232

33-
// VSphereMachineTemplateWebhook implements a validation and defaulting webhook for VSphereMachineTemplate.
34-
type VSphereMachineTemplateWebhook struct{}
33+
// VSphereMachineTemplate implements a validation webhook for VSphereMachineTemplate.
34+
type VSphereMachineTemplate struct{}
3535

3636
// SetupWebhookWithManager sets up VSphereMachineTemplate webhooks.
37-
func (webhook *VSphereMachineTemplateWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error {
37+
func (webhook *VSphereMachineTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error {
3838
return (&vmware.VSphereMachineTemplateWebhook{}).SetupWebhookWithManager(mgr)
3939
}

0 commit comments

Comments
 (0)