manager

package
v1.10.16 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Overview

Package manager provides functionality relating to the integration between Cilium and MetalLB, namely providing abstractions that help manage MetalLB from Cilium.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	*metallbctl.Controller
	// contains filtered or unexported fields
}

Manager represents the BGP manager. It integrates Cilium with the MetalLB logic for allocating LB IPs for service objects of type LoadBalancer.

This manager also subscribes and handles K8s services events from the watcher and pushes them into a queue. From the queue, they are processed by the reconciliation logic of MetalLB for LB IP allocation. To do this, Manager implements github.com/cilium/cilium/pkg/k8s/watchers/subscriber.ServiceHandler and therefore is registered as a subscriber to the subscriber package to be called from the K8s watcher.

Note that the LB IP allocation occurs only for services of type LoadBalancer in the service.Status.LoadBalancerStatus.Ingress field.

func New

func New(indexer cache.Store) *Manager

New creates a new BGP MetalLB manager. It contains the MetalLB service IP controller, which contains the allocator.

New requires access to a cache.Store associated with the service watcher.

func (*Manager) Logger added in v1.10.0

func (c *Manager) Logger() *bgplog.Logger

Logger returns the controller's logger.

func (*Manager) OnAdd added in v1.10.0

func (m *Manager) OnAdd(obj *slim_corev1.Service)

OnAdd handles an add event for services. It implements github.com/cilium/cilium/pkg/k8s/watchers/subscriber.ServiceHandler.

func (*Manager) OnDelete added in v1.10.0

func (m *Manager) OnDelete(obj *slim_corev1.Service)

OnDelete handles a delete event for services. It implements github.com/cilium/cilium/pkg/k8s/watchers/subscriber.ServiceHandler.

func (*Manager) OnUpdate added in v1.10.0

func (m *Manager) OnUpdate(oldObj, newObj *slim_corev1.Service)

OnUpdate handles an update event for services. It implements github.com/cilium/cilium/pkg/k8s/watchers/subscriber.ServiceHandler.

Jump to

Keyboard shortcuts

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