reconcilerv2

package
v1.16.0-pre.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type ConfigReconciler

type ConfigReconciler interface {
	// Name returns the name of a reconciler.
	Name() string
	// Priority is used to determine the order in which reconcilers are called. Reconcilers are called from lowest to
	// highest.
	Priority() int
	// Reconcile performs the reconciliation actions for given BGPInstance.
	Reconcile(ctx context.Context, params ReconcileParams) error
}

func GetActiveReconcilers

func GetActiveReconcilers(log logrus.FieldLogger, reconcilers []ConfigReconciler) []ConfigReconciler

GetActiveReconcilers returns a list of reconcilers in order of priority that should be used to reconcile the BGP config.

type NeighborReconciler

type NeighborReconciler struct {
	Logger       logrus.FieldLogger
	SecretStore  store.BGPCPResourceStore[*slim_corev1.Secret]
	PeerConfig   store.BGPCPResourceStore[*v2alpha1.CiliumBGPPeerConfig]
	DaemonConfig *option.DaemonConfig
}

NeighborReconciler is a ConfigReconciler which reconciles the peers of the provided BGP server with the provided CiliumBGPVirtualRouter.

func (*NeighborReconciler) Name

func (r *NeighborReconciler) Name() string

func (*NeighborReconciler) Priority

func (r *NeighborReconciler) Priority() int

Priority of neighbor reconciler is higher than pod/service announcements. This is important for graceful restart case, where all expected routes are pushed into gobgp RIB before neighbors are added. So, gobgp can send out all prefixes within initial update message exchange with neighbors before sending EOR marker.

func (*NeighborReconciler) Reconcile

type NeighborReconcilerIn

type NeighborReconcilerIn struct {
	cell.In
	Logger       logrus.FieldLogger
	SecretStore  store.BGPCPResourceStore[*slim_corev1.Secret]
	PeerConfig   store.BGPCPResourceStore[*v2alpha1.CiliumBGPPeerConfig]
	DaemonConfig *option.DaemonConfig
}

type NeighborReconcilerMetadata

type NeighborReconcilerMetadata map[string][]*PeerData

NeighborReconcilerMetadata keeps a map of running peers to peer configuration. key is the peer name.

type NeighborReconcilerOut

type NeighborReconcilerOut struct {
	cell.Out

	Reconciler ConfigReconciler `group:"bgp-config-reconciler-v2"`
}

func NewNeighborReconciler

func NewNeighborReconciler(params NeighborReconcilerIn) NeighborReconcilerOut

type PeerData

type PeerData struct {
	Peer     *v2alpha1.CiliumBGPNodePeer
	Config   *v2alpha1.CiliumBGPPeerConfigSpec
	Password string
}

PeerData keeps a peer and its configuration. It also keeps the TCP password from secret store. +deepequal-gen=true Note: If you change PeerDate, do not forget to 'make generate-k8s-api', which will update DeepEqual method.

func (*PeerData) DeepEqual

func (in *PeerData) DeepEqual(other *PeerData) bool

DeepEqual is an autogenerated deepequal function, deeply comparing the receiver with other. in must be non-nil.

type PreflightReconciler

type PreflightReconciler struct {
	Logger logrus.FieldLogger
}

PreflightReconciler reconciles BPG Global configuration. This reconciler is similar to v1 preflight reconciler. It must be run before any other reconcilers for given BGP instance.

func (*PreflightReconciler) Name

func (r *PreflightReconciler) Name() string

func (*PreflightReconciler) Priority

func (r *PreflightReconciler) Priority() int

func (*PreflightReconciler) Reconcile

type PreflightReconcilerIn

type PreflightReconcilerIn struct {
	cell.In

	Logger logrus.FieldLogger
}

type PreflightReconcilerOut

type PreflightReconcilerOut struct {
	cell.Out

	Reconciler ConfigReconciler `group:"bgp-config-reconciler-v2"`
}

func NewPreflightReconciler

func NewPreflightReconciler(params PreflightReconcilerIn) PreflightReconcilerOut

type ReconcileParams

type ReconcileParams struct {
	BGPInstance   *instance.BGPInstance
	DesiredConfig *v2alpha1.CiliumBGPNodeInstance
	CiliumNode    *v2api.CiliumNode
}

Jump to

Keyboard shortcuts

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