Documentation ¶
Index ¶
- Variables
- type ConfigReconciler
- type ExportPodCIDRReconciler
- func (r *ExportPodCIDRReconciler) Cleanup(_ *instance.ServerWithConfig)
- func (r *ExportPodCIDRReconciler) Init(_ *instance.ServerWithConfig) error
- func (r *ExportPodCIDRReconciler) Name() string
- func (r *ExportPodCIDRReconciler) Priority() int
- func (r *ExportPodCIDRReconciler) Reconcile(ctx context.Context, p ReconcileParams) error
- type ExportPodCIDRReconcilerMetadata
- type ExportPodCIDRReconcilerOut
- type LBServiceReconciler
- func (r *LBServiceReconciler) Cleanup(sc *instance.ServerWithConfig)
- func (r *LBServiceReconciler) Init(sc *instance.ServerWithConfig) error
- func (r *LBServiceReconciler) Name() string
- func (r *LBServiceReconciler) Priority() int
- func (r *LBServiceReconciler) Reconcile(ctx context.Context, p ReconcileParams) error
- type LBServiceReconcilerMetadata
- type LBServiceReconcilerOut
- type NeighborReconciler
- func (r *NeighborReconciler) Cleanup(_ *instance.ServerWithConfig)
- func (r *NeighborReconciler) Init(_ *instance.ServerWithConfig) error
- func (r *NeighborReconciler) Name() string
- func (r *NeighborReconciler) Priority() int
- func (r *NeighborReconciler) Reconcile(ctx context.Context, p ReconcileParams) error
- type NeighborReconcilerMetadata
- type NeighborReconcilerOut
- type PodIPPoolReconciler
- func (r *PodIPPoolReconciler) Cleanup(_ *instance.ServerWithConfig)
- func (r *PodIPPoolReconciler) Init(_ *instance.ServerWithConfig) error
- func (r *PodIPPoolReconciler) Name() string
- func (r *PodIPPoolReconciler) Priority() int
- func (r *PodIPPoolReconciler) Reconcile(ctx context.Context, p ReconcileParams) error
- type PodIPPoolReconcilerMetadata
- type PodIPPoolReconcilerOut
- type PreflightReconciler
- func (r *PreflightReconciler) Cleanup(_ *instance.ServerWithConfig)
- func (r *PreflightReconciler) Init(_ *instance.ServerWithConfig) error
- func (r *PreflightReconciler) Name() string
- func (r *PreflightReconciler) Priority() int
- func (r *PreflightReconciler) Reconcile(ctx context.Context, p ReconcileParams) error
- type PreflightReconcilerOut
- type ReconcileParams
- type RoutePolicyReconciler
- func (r *RoutePolicyReconciler) Cleanup(_ *instance.ServerWithConfig)
- func (r *RoutePolicyReconciler) Init(_ *instance.ServerWithConfig) error
- func (r *RoutePolicyReconciler) Name() string
- func (r *RoutePolicyReconciler) Priority() int
- func (r *RoutePolicyReconciler) Reconcile(ctx context.Context, params ReconcileParams) error
- type RoutePolicyReconcilerMetadata
- type RoutePolicyReconcilerOut
Constants ¶
This section is empty.
Variables ¶
var ConfigReconcilers = cell.Provide( NewPreflightReconciler, NewNeighborReconciler, NewExportPodCIDRReconciler, NewPodIPPoolReconciler, NewLBServiceReconciler, NewRoutePolicyReconciler, )
ConfigReconcilers contains all reconcilers used by the route manager to manage the BGP config.
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 // Init is called upon virtual router instance creation. Reconcilers can initialize any instance-specific // resources here, and clean them up upon Cleanup call. Init(sc *instance.ServerWithConfig) error // Cleanup is called upon virtual router instance deletion. When called, reconcilers are supposed // to clean up all instance-specific resources saved outside the ReconcilerMetadata. Cleanup(sc *instance.ServerWithConfig) // Reconcile If the `Config` field in `params.sc` is nil the reconciler should unconditionally // perform the reconciliation actions, as no previous configuration is present. Reconcile(ctx context.Context, params ReconcileParams) error }
ConfigReconciler is a interface for reconciling a particular aspect of an old and new *v2alpha1api.CiliumBGPVirtualRouter
type ExportPodCIDRReconciler ¶
type ExportPodCIDRReconciler struct{}
exportPodCIDRReconciler is a ConfigReconciler which reconciles the advertisement of the private Kubernetes PodCIDR block.
func (*ExportPodCIDRReconciler) Cleanup ¶ added in v1.15.9
func (r *ExportPodCIDRReconciler) Cleanup(_ *instance.ServerWithConfig)
func (*ExportPodCIDRReconciler) Init ¶ added in v1.15.9
func (r *ExportPodCIDRReconciler) Init(_ *instance.ServerWithConfig) error
func (*ExportPodCIDRReconciler) Name ¶
func (r *ExportPodCIDRReconciler) Name() string
func (*ExportPodCIDRReconciler) Priority ¶
func (r *ExportPodCIDRReconciler) Priority() int
func (*ExportPodCIDRReconciler) Reconcile ¶
func (r *ExportPodCIDRReconciler) Reconcile(ctx context.Context, p ReconcileParams) error
type ExportPodCIDRReconcilerMetadata ¶
ExportPodCIDRReconcilerMetadata keeps a list of all advertised Paths
type ExportPodCIDRReconcilerOut ¶
type ExportPodCIDRReconcilerOut struct { cell.Out Reconciler ConfigReconciler `group:"bgp-config-reconciler"` }
func NewExportPodCIDRReconciler ¶
func NewExportPodCIDRReconciler(dc *option.DaemonConfig) ExportPodCIDRReconcilerOut
type LBServiceReconciler ¶
type LBServiceReconciler struct {
// contains filtered or unexported fields
}
func (*LBServiceReconciler) Cleanup ¶ added in v1.15.9
func (r *LBServiceReconciler) Cleanup(sc *instance.ServerWithConfig)
func (*LBServiceReconciler) Init ¶ added in v1.15.9
func (r *LBServiceReconciler) Init(sc *instance.ServerWithConfig) error
func (*LBServiceReconciler) Name ¶
func (r *LBServiceReconciler) Name() string
func (*LBServiceReconciler) Priority ¶
func (r *LBServiceReconciler) Priority() int
func (*LBServiceReconciler) Reconcile ¶
func (r *LBServiceReconciler) Reconcile(ctx context.Context, p ReconcileParams) error
type LBServiceReconcilerMetadata ¶
LBServiceReconcilerMetadata keeps a map of services to the respective advertised Paths
type LBServiceReconcilerOut ¶
type LBServiceReconcilerOut struct { cell.Out Reconciler ConfigReconciler `group:"bgp-config-reconciler"` }
func NewLBServiceReconciler ¶
func NewLBServiceReconciler(diffStore store.DiffStore[*slim_corev1.Service], epDiffStore store.DiffStore[*k8s.Endpoints]) LBServiceReconcilerOut
type NeighborReconciler ¶
type NeighborReconciler struct { SecretStore store.BGPCPResourceStore[*slim_corev1.Secret] DaemonConfig *option.DaemonConfig }
NeighborReconciler is a ConfigReconciler which reconciles the peers of the provided BGP server with the provided CiliumBGPVirtualRouter.
func (*NeighborReconciler) Cleanup ¶ added in v1.15.9
func (r *NeighborReconciler) Cleanup(_ *instance.ServerWithConfig)
func (*NeighborReconciler) Init ¶ added in v1.15.9
func (r *NeighborReconciler) Init(_ *instance.ServerWithConfig) error
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 NeighborReconcilerMetadata ¶
type NeighborReconcilerMetadata map[string]neighborReconcilerMetadata
NeighborReconcilerMetadata keeps a map of peers to passwords, fetched from secrets. Key is PeerAddress+PeerASN.
type NeighborReconcilerOut ¶
type NeighborReconcilerOut struct { cell.Out Reconciler ConfigReconciler `group:"bgp-config-reconciler"` }
func NewNeighborReconciler ¶
func NewNeighborReconciler(SecretStore store.BGPCPResourceStore[*slim_corev1.Secret], DaemonConfig *option.DaemonConfig) NeighborReconcilerOut
type PodIPPoolReconciler ¶
type PodIPPoolReconciler struct {
// contains filtered or unexported fields
}
func (*PodIPPoolReconciler) Cleanup ¶ added in v1.15.9
func (r *PodIPPoolReconciler) Cleanup(_ *instance.ServerWithConfig)
func (*PodIPPoolReconciler) Init ¶ added in v1.15.9
func (r *PodIPPoolReconciler) Init(_ *instance.ServerWithConfig) error
func (*PodIPPoolReconciler) Name ¶
func (r *PodIPPoolReconciler) Name() string
func (*PodIPPoolReconciler) Priority ¶
func (r *PodIPPoolReconciler) Priority() int
func (*PodIPPoolReconciler) Reconcile ¶
func (r *PodIPPoolReconciler) Reconcile(ctx context.Context, p ReconcileParams) error
type PodIPPoolReconcilerMetadata ¶
PodIPPoolReconcilerMetadata holds any announced pod ip pool CIDRs keyed by pool name of the backing CiliumPodIPPool.
type PodIPPoolReconcilerOut ¶
type PodIPPoolReconcilerOut struct { cell.Out Reconciler ConfigReconciler `group:"bgp-config-reconciler"` }
func NewPodIPPoolReconciler ¶
func NewPodIPPoolReconciler(poolStore store.BGPCPResourceStore[*v2alpha1api.CiliumPodIPPool]) PodIPPoolReconcilerOut
type PreflightReconciler ¶
type PreflightReconciler struct{}
PreflightReconciler is a preflight task before any other reconciliation should take place.
this reconciler handles any changes in current and desired BgpState which leads to a recreation of an existing BgpServer.
this must be done first so that the following reconciliation functions act upon the recreated BgpServer with the desired permanent configurations.
permanent configurations for BgpServers (ones that cannot be changed after creation) are router ID and local listening port.
func (*PreflightReconciler) Cleanup ¶ added in v1.15.9
func (r *PreflightReconciler) Cleanup(_ *instance.ServerWithConfig)
func (*PreflightReconciler) Init ¶ added in v1.15.9
func (r *PreflightReconciler) Init(_ *instance.ServerWithConfig) error
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 PreflightReconcilerOut ¶
type PreflightReconcilerOut struct { cell.Out Reconciler ConfigReconciler `group:"bgp-config-reconciler"` }
func NewPreflightReconciler ¶
func NewPreflightReconciler() PreflightReconcilerOut
type ReconcileParams ¶
type ReconcileParams struct { CurrentServer *instance.ServerWithConfig DesiredConfig *v2alpha1api.CiliumBGPVirtualRouter CiliumNode *v2api.CiliumNode }
type RoutePolicyReconciler ¶
type RoutePolicyReconciler struct {
// contains filtered or unexported fields
}
func (*RoutePolicyReconciler) Cleanup ¶ added in v1.15.9
func (r *RoutePolicyReconciler) Cleanup(_ *instance.ServerWithConfig)
func (*RoutePolicyReconciler) Init ¶ added in v1.15.9
func (r *RoutePolicyReconciler) Init(_ *instance.ServerWithConfig) error
func (*RoutePolicyReconciler) Name ¶
func (r *RoutePolicyReconciler) Name() string
func (*RoutePolicyReconciler) Priority ¶
func (r *RoutePolicyReconciler) Priority() int
func (*RoutePolicyReconciler) Reconcile ¶
func (r *RoutePolicyReconciler) Reconcile(ctx context.Context, params ReconcileParams) error
type RoutePolicyReconcilerMetadata ¶
type RoutePolicyReconcilerMetadata map[string]*types.RoutePolicy
RoutePolicyReconcilerMetadata holds routing policies configured by the policy reconciler keyed by policy name.
type RoutePolicyReconcilerOut ¶
type RoutePolicyReconcilerOut struct { cell.Out Reconciler ConfigReconciler `group:"bgp-config-reconciler"` }
func NewRoutePolicyReconciler ¶
func NewRoutePolicyReconciler( lbStore store.BGPCPResourceStore[*v2alpha1api.CiliumLoadBalancerIPPool], podStore store.BGPCPResourceStore[*v2alpha1api.CiliumPodIPPool], ) RoutePolicyReconcilerOut