webhookv1beta2

package
v0.14.5 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Logger           log.Logger
	WebhookClient    client.Reader
	Validator        validate.ClusterObjects
	MetalLBNamespace string
)
View Source
var GetExistingBGPPeers = func() (*v1beta2.BGPPeerList, error) {
	existingBGPPeerslList := &v1beta2.BGPPeerList{}
	err := WebhookClient.List(context.Background(), existingBGPPeerslList, &client.ListOptions{Namespace: MetalLBNamespace})
	if err != nil {
		return nil, errors.Wrapf(err, "Failed to get existing BGPPeer objects")
	}
	return existingBGPPeerslList, nil
}

Functions

This section is empty.

Types

type BGPPeerValidator

type BGPPeerValidator struct {
	ClusterResourceNamespace string
	// contains filtered or unexported fields
}

+kubebuilder:webhook:verbs=create;update,path=/validate-metallb-io-v1beta2-bgppeer,mutating=false,failurePolicy=fail,groups=metallb.io,resources=bgppeers,versions=v1beta2,name=bgppeersvalidationwebhook.metallb.io,sideEffects=None,admissionReviewVersions=v1

func (*BGPPeerValidator) Handle

func (v *BGPPeerValidator) Handle(ctx context.Context, req admission.Request) (resp admission.Response)

Handle handled incoming admission requests for BGPPeer objects.

func (*BGPPeerValidator) SetupWebhookWithManager

func (v *BGPPeerValidator) SetupWebhookWithManager(mgr ctrl.Manager) error

Jump to

Keyboard shortcuts

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