reconciler

package
v1.15.5 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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
	// 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) Name

func (r *ExportPodCIDRReconciler) Name() string

func (*ExportPodCIDRReconciler) Priority

func (r *ExportPodCIDRReconciler) Priority() int

func (*ExportPodCIDRReconciler) Reconcile

type ExportPodCIDRReconcilerMetadata

type ExportPodCIDRReconcilerMetadata []*types.Path

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) Name

func (r *LBServiceReconciler) Name() string

func (*LBServiceReconciler) Priority

func (r *LBServiceReconciler) Priority() int

func (*LBServiceReconciler) Reconcile

type LBServiceReconcilerMetadata

type LBServiceReconcilerMetadata map[resource.Key][]*types.Path

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) 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 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) Name

func (r *PodIPPoolReconciler) Name() string

func (*PodIPPoolReconciler) Priority

func (r *PodIPPoolReconciler) Priority() int

func (*PodIPPoolReconciler) Reconcile

type PodIPPoolReconcilerMetadata

type PodIPPoolReconcilerMetadata map[resource.Key][]*types.Path

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"`
}

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) Name

func (r *PreflightReconciler) Name() string

func (*PreflightReconciler) Priority

func (r *PreflightReconciler) Priority() int

func (*PreflightReconciler) Reconcile

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) 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"`
}

Jump to

Keyboard shortcuts

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