speaker

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 27 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsOpenELBService added in v0.6.0

func IsOpenELBService(svc *corev1.Service) bool

func ParseInterface added in v0.6.0

func ParseInterface(ifaceName string, v4 bool) (iface *net.Interface, err error)

func ValidateInterface added in v0.6.0

func ValidateInterface(netif *net.Interface, r iprange.Range) error

Types

type Config added in v0.6.0

type Config struct {
	Name    string
	IPRange iprange.Range
	Iface   string
}

type EIPReconciler added in v0.6.0

type EIPReconciler struct {
	client.Client
	record.EventRecorder

	Reload   chan event.GenericEvent
	Reloader func(context.Context) error
	Handler  func(context.Context, *v1alpha2.Eip) error
}

BgpConfReconciler reconciles a BgpConf object

func (*EIPReconciler) Reconcile added in v0.6.0

func (e *EIPReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster BgpConf CRD closer to the desired state.

func (*EIPReconciler) SetupWithManager added in v0.6.0

func (e *EIPReconciler) SetupWithManager(mgr ctrl.Manager) error

type Fake

type Fake struct {
	// contains filtered or unexported fields
}

func NewFake

func NewFake() *Fake

func (*Fake) DelBalancer

func (f *Fake) DelBalancer(ip string) error

func (*Fake) Equal

func (f *Fake) Equal(ip string, nexthops []string) bool

func (*Fake) SetBalancer

func (f *Fake) SetBalancer(ip string, nexthops []corev1.Node) error

func (*Fake) Start

func (f *Fake) Start(stopCh <-chan struct{}) error

type LBReconciler added in v0.6.0

type LBReconciler struct {
	client.Client
	record.EventRecorder

	Handler func(context.Context, *corev1.Service) error
}

LBReconciler reconciles a service object

func (*LBReconciler) Reconcile added in v0.6.0

func (l *LBReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster BgpConf CRD closer to the desired state.

func (*LBReconciler) SetupWithManager added in v0.6.0

func (r *LBReconciler) SetupWithManager(mgr ctrl.Manager) error

type Manager added in v0.6.0

type Manager struct {
	client.Client
	record.EventRecorder
	// contains filtered or unexported fields
}

func NewSpeakerManager added in v0.6.0

func NewSpeakerManager(mgr manager.Manager) *Manager

func (*Manager) HandleEIP added in v0.6.0

func (m *Manager) HandleEIP(ctx context.Context, eip *v1alpha2.Eip) error

func (*Manager) HandleService added in v0.6.0

func (m *Manager) HandleService(ctx context.Context, svc *corev1.Service) error

func (*Manager) RegisterSpeaker added in v0.6.0

func (m *Manager) RegisterSpeaker(ctx context.Context, name string, speaker Speaker) error

TODO: Dynamically configure the speaker through configmap

func (*Manager) ResyncEIPSpeaker added in v0.6.0

func (m *Manager) ResyncEIPSpeaker(ctx context.Context) error

func (*Manager) Start added in v0.6.0

func (m *Manager) Start(ctx context.Context) (err error)

func (*Manager) UnRegisterSpeaker added in v0.6.0

func (m *Manager) UnRegisterSpeaker(name string)

type Speaker

type Speaker interface {
	SetBalancer(ip string, nexthops []corev1.Node) error
	DelBalancer(ip string) error
	Start(stopCh <-chan struct{}) error
	ConfigureWithEIP(config Config, deleted bool) error
}

Directories

Path Synopsis
bgp

Jump to

Keyboard shortcuts

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