Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ConfigReconcilers = cell.ProvidePrivate( NewPreflightReconciler, NewNeighborReconciler, )
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 ¶
func (r *NeighborReconciler) Reconcile(ctx context.Context, p ReconcileParams) error
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 ¶
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.
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 ¶
func (r *PreflightReconciler) Reconcile(ctx context.Context, p ReconcileParams) error
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 }