webhooks

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package webhooks implements webhooks.

Index

Constants

View Source
const (
	// SkipValidateDeleteWebhookAnnotation is an annotation that can be applied
	// to the InClusterIPPool or GlobalInClusterIPPool to skip delete
	// validation. Necessary for clusterctl move to work as expected.
	SkipValidateDeleteWebhookAnnotation = "ipam.cluster.x-k8s.io/skip-validate-delete-webhook"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type InClusterIPPool

type InClusterIPPool struct {
	Client client.Reader
}

InClusterIPPool implements a validating and defaulting webhook for InClusterIPPool and GlobalInClusterIPPool.

func (*InClusterIPPool) Default

func (webhook *InClusterIPPool) Default(_ context.Context, _ runtime.Object) error

Default satisfies the defaulting webhook interface.

func (*InClusterIPPool) SetupWebhookWithManager

func (webhook *InClusterIPPool) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*InClusterIPPool) ValidateCreate

func (webhook *InClusterIPPool) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error)

ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type.

func (*InClusterIPPool) ValidateDelete

func (webhook *InClusterIPPool) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)

ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type.

func (*InClusterIPPool) ValidateUpdate

func (webhook *InClusterIPPool) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL