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.Join(err, errors.New("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
Click to show internal directories.
Click to hide internal directories.