Documentation
¶
Index ¶
- func SetupHubWebhookWithManager(mgr ctrl.Manager) error
- func SetupSpokeWebhookWithManager(mgr ctrl.Manager, instanceType string) error
- type HubCustomValidator
- func (v *HubCustomValidator) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (v *HubCustomValidator) ValidateDelete(_ context.Context, obj runtime.Object) (admission.Warnings, error)
- func (v *HubCustomValidator) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
- type SpokeCustomValidator
- func (v *SpokeCustomValidator) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (v *SpokeCustomValidator) ValidateDelete(_ context.Context, obj runtime.Object) (admission.Warnings, error)
- func (v *SpokeCustomValidator) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupHubWebhookWithManager ¶
SetupHubWebhookWithManager registers the webhook for Hub in the manager.
Types ¶
type HubCustomValidator ¶
type HubCustomValidator struct {
// contains filtered or unexported fields
}
HubCustomValidator struct is responsible for validating the Hub resource when it is created, updated, or deleted.
NOTE: The +kubebuilder:object:generate=false marker prevents controller-gen from generating DeepCopy methods, as this struct is used only for temporary operations and does not need to be deeply copied.
func (*HubCustomValidator) ValidateCreate ¶
func (v *HubCustomValidator) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type Hub.
func (*HubCustomValidator) ValidateDelete ¶
func (v *HubCustomValidator) ValidateDelete(_ context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type Hub.
func (*HubCustomValidator) ValidateUpdate ¶
func (v *HubCustomValidator) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type Hub.
type SpokeCustomValidator ¶
type SpokeCustomValidator struct {
// contains filtered or unexported fields
}
SpokeCustomValidator struct is responsible for validating the Spoke resource when it is created, updated, or deleted.
NOTE: The +kubebuilder:object:generate=false marker prevents controller-gen from generating DeepCopy methods, as this struct is used only for temporary operations and does not need to be deeply copied.
func (*SpokeCustomValidator) ValidateCreate ¶
func (v *SpokeCustomValidator) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type Spoke.
func (*SpokeCustomValidator) ValidateDelete ¶
func (v *SpokeCustomValidator) ValidateDelete(_ context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type Spoke.
func (*SpokeCustomValidator) ValidateUpdate ¶
func (v *SpokeCustomValidator) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type Spoke.