Documentation
¶
Index ¶
- func SetupClusterWebhookWithManager(mgr ctrl.Manager) error
- func SetupFailoverWebhookWithManager(mgr ctrl.Manager) error
- func SetupUserWebhookWithManager(mgr ctrl.Manager) error
- type ClusterCustomValidator
- func (v *ClusterCustomValidator) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (v *ClusterCustomValidator) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (v *ClusterCustomValidator) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
- type FailoverCustomValidator
- func (v *FailoverCustomValidator) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (v *FailoverCustomValidator) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (v *FailoverCustomValidator) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
- type UserCustomDefaulter
- type UserCustomValidator
- func (v *UserCustomValidator) ValidateCreate(ctx context.Context, obj runtime.Object) (warns admission.Warnings, err error)
- func (v *UserCustomValidator) ValidateDelete(ctx context.Context, obj runtime.Object) (warns admission.Warnings, err error)
- func (v *UserCustomValidator) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (warns admission.Warnings, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupClusterWebhookWithManager ¶
SetupClusterWebhookWithManager registers the webhook for Cluster in the manager.
func SetupFailoverWebhookWithManager ¶
SetupFailoverWebhookWithManager registers the webhook for Failover in the manager.
func SetupUserWebhookWithManager ¶
SetupUserWebhookWithManager registers the webhook for User in the manager.
Types ¶
type ClusterCustomValidator ¶
type ClusterCustomValidator struct{}
ClusterCustomValidator struct is responsible for validating the Cluster 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 (*ClusterCustomValidator) ValidateCreate ¶
func (v *ClusterCustomValidator) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type Cluster.
func (*ClusterCustomValidator) ValidateDelete ¶
func (v *ClusterCustomValidator) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type Cluster.
func (*ClusterCustomValidator) ValidateUpdate ¶
func (v *ClusterCustomValidator) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type Cluster.
type FailoverCustomValidator ¶
type FailoverCustomValidator struct{}
FailoverCustomValidator struct is responsible for validating the Failover 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 (*FailoverCustomValidator) ValidateCreate ¶
func (v *FailoverCustomValidator) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type Failover.
func (*FailoverCustomValidator) ValidateDelete ¶
func (v *FailoverCustomValidator) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type Failover.
func (*FailoverCustomValidator) ValidateUpdate ¶
func (v *FailoverCustomValidator) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type Failover.
type UserCustomDefaulter ¶
type UserCustomDefaulter struct {
// contains filtered or unexported fields
}
UserCustomDefaulter struct is responsible for setting default values on the custom resource of the Kind User when those are created or updated.
NOTE: The +kubebuilder:object:generate=false marker prevents controller-gen from generating DeepCopy methods, as it is used only for temporary operations and does not need to be deeply copied.
type UserCustomValidator ¶
type UserCustomValidator struct {
// contains filtered or unexported fields
}
UserCustomValidator struct is responsible for validating the User 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 (*UserCustomValidator) ValidateCreate ¶
func (v *UserCustomValidator) ValidateCreate(ctx context.Context, obj runtime.Object) (warns admission.Warnings, err error)
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type User.
func (*UserCustomValidator) ValidateDelete ¶
func (v *UserCustomValidator) ValidateDelete(ctx context.Context, obj runtime.Object) (warns admission.Warnings, err error)
ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type User.
func (*UserCustomValidator) ValidateUpdate ¶
func (v *UserCustomValidator) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (warns admission.Warnings, err error)
ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type User.