|
| 1 | +/* |
| 2 | +Copyright 2025 The Kubernetes Authors. |
| 3 | +
|
| 4 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +you may not use this file except in compliance with the License. |
| 6 | +You may obtain a copy of the License at |
| 7 | +
|
| 8 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +
|
| 10 | +Unless required by applicable law or agreed to in writing, software |
| 11 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +See the License for the specific language governing permissions and |
| 14 | +limitations under the License. |
| 15 | +*/ |
| 16 | + |
| 17 | +package webhooks |
| 18 | + |
| 19 | +import ( |
| 20 | + ctrl "sigs.k8s.io/controller-runtime" |
| 21 | + |
| 22 | + "sigs.k8s.io/cluster-api-provider-vsphere/internal/webhooks" |
| 23 | +) |
| 24 | + |
| 25 | +// VSphereClusterTemplateWebhook implements a validation and defaulting webhook for VSphereClusterTemplate. |
| 26 | +type VSphereClusterTemplateWebhook struct{} |
| 27 | + |
| 28 | +// SetupWebhookWithManager sets up VSphereClusterTemplate webhooks. |
| 29 | +func (webhook *VSphereClusterTemplateWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error { |
| 30 | + return (&webhooks.VSphereClusterTemplateWebhook{}).SetupWebhookWithManager(mgr) |
| 31 | +} |
| 32 | + |
| 33 | +// VSphereDeploymentZoneWebhook implements a validation and defaulting webhook for VSphereDeploymentZone. |
| 34 | +type VSphereDeploymentZoneWebhook struct{} |
| 35 | + |
| 36 | +// SetupWebhookWithManager sets up VSphereDeploymentZone webhooks. |
| 37 | +func (webhook *VSphereDeploymentZoneWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error { |
| 38 | + return (&webhooks.VSphereDeploymentZoneWebhook{}).SetupWebhookWithManager(mgr) |
| 39 | +} |
| 40 | + |
| 41 | +// VSphereFailureDomainWebhook implements a validation and defaulting webhook for VSphereFailureDomain. |
| 42 | +type VSphereFailureDomainWebhook struct{} |
| 43 | + |
| 44 | +// SetupWebhookWithManager sets up VSphereFailureDomain webhooks. |
| 45 | +func (webhook *VSphereFailureDomainWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error { |
| 46 | + return (&webhooks.VSphereFailureDomainWebhook{}).SetupWebhookWithManager(mgr) |
| 47 | +} |
| 48 | + |
| 49 | +// VSphereMachineWebhook implements a validation and defaulting webhook for VSphereMachine. |
| 50 | +type VSphereMachineWebhook struct{} |
| 51 | + |
| 52 | +// SetupWebhookWithManager sets up VSphereMachine webhooks. |
| 53 | +func (webhook *VSphereMachineWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error { |
| 54 | + return (&webhooks.VSphereMachineWebhook{}).SetupWebhookWithManager(mgr) |
| 55 | +} |
| 56 | + |
| 57 | +// VSphereMachineTemplateWebhook implements a validation and defaulting webhook for VSphereMachineTemplate. |
| 58 | +type VSphereMachineTemplateWebhook struct{} |
| 59 | + |
| 60 | +// SetupWebhookWithManager sets up VSphereMachineTemplate webhooks. |
| 61 | +func (webhook *VSphereMachineTemplateWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error { |
| 62 | + return (&webhooks.VSphereMachineTemplateWebhook{}).SetupWebhookWithManager(mgr) |
| 63 | +} |
| 64 | + |
| 65 | +// VSphereVMWebhook implements a validation and defaulting webhook for VSphereVM. |
| 66 | +type VSphereVMWebhook struct{} |
| 67 | + |
| 68 | +// SetupWebhookWithManager sets up VSphereVM webhooks. |
| 69 | +func (webhook *VSphereVMWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error { |
| 70 | + return (&webhooks.VSphereVMWebhook{}).SetupWebhookWithManager(mgr) |
| 71 | +} |
0 commit comments