ownershippol

package
v0.0.0-...-8f3027a Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExclusiveOwnershipPolicy

type ExclusiveOwnershipPolicy struct {
	InterfaceNames []string
}

func (*ExclusiveOwnershipPolicy) IfaceIsOurs

func (d *ExclusiveOwnershipPolicy) IfaceIsOurs(ifaceName string) bool

func (*ExclusiveOwnershipPolicy) IfaceShouldHaveARPEntries

func (d *ExclusiveOwnershipPolicy) IfaceShouldHaveARPEntries(ifaceName string) bool

func (*ExclusiveOwnershipPolicy) IfaceShouldHaveGracePeriod

func (d *ExclusiveOwnershipPolicy) IfaceShouldHaveGracePeriod(ifaceName string) bool

func (*ExclusiveOwnershipPolicy) RouteIsOurs

func (d *ExclusiveOwnershipPolicy) RouteIsOurs(ifaceName string, route *netlink.Route) bool

type MainTableOwnershipPolicy

type MainTableOwnershipPolicy struct {
	WorkloadInterfacePrefixes     []string
	RemoveNonCalicoWorkloadRoutes bool

	// CalicoSpecialInterfaces is a list of interfaces that Calico uses for
	// tunnels and special purposes.
	CalicoSpecialInterfaces []string

	// AllRouteProtocols is a list of protocols that Calico uses,
	// but may be used by other software too.
	AllRouteProtocols []netlink.RouteProtocol

	// ExclusiveRouteProtocols is a list of protocols that should only be
	// used by Calico.
	ExclusiveRouteProtocols []netlink.RouteProtocol
}

MainTableOwnershipPolicy is the MainTableOwnershipPolicy for the main routing table. It needs to discriminate between our routes and routes from other applications. It does that based on various heuristics that try to capture Felix's current and historic behaviour. It would have been a lot cleaner if we'd picked a "protocol" value for all our routes on day one and stuck to it!

func NewMainTable

func NewMainTable(
	vxlanIfaceName string,
	deviceRouteProto netlink.RouteProtocol,
	workloadIfacePrefixes []string,
	removeExternalRoutes bool,
) *MainTableOwnershipPolicy

NewMainTable calculates the ownership policy for the main routing table, given Felix's configuration.

func (*MainTableOwnershipPolicy) IfaceIsOurs

func (d *MainTableOwnershipPolicy) IfaceIsOurs(_ string) bool

func (*MainTableOwnershipPolicy) IfaceShouldHaveARPEntries

func (d *MainTableOwnershipPolicy) IfaceShouldHaveARPEntries(ifaceName string) bool

func (*MainTableOwnershipPolicy) IfaceShouldHaveGracePeriod

func (d *MainTableOwnershipPolicy) IfaceShouldHaveGracePeriod(ifaceName string) bool

func (*MainTableOwnershipPolicy) RouteIsOurs

func (d *MainTableOwnershipPolicy) RouteIsOurs(ifaceName string, route *netlink.Route) bool

Jump to

Keyboard shortcuts

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