Documentation ¶
Index ¶
- type ExclusiveOwnershipPolicy
- func (d *ExclusiveOwnershipPolicy) IfaceIsOurs(ifaceName string) bool
- func (d *ExclusiveOwnershipPolicy) IfaceShouldHaveARPEntries(ifaceName string) bool
- func (d *ExclusiveOwnershipPolicy) IfaceShouldHaveGracePeriod(ifaceName string) bool
- func (d *ExclusiveOwnershipPolicy) RouteIsOurs(ifaceName string, route *netlink.Route) bool
- type MainTableOwnershipPolicy
- func (d *MainTableOwnershipPolicy) IfaceIsOurs(_ string) bool
- func (d *MainTableOwnershipPolicy) IfaceShouldHaveARPEntries(ifaceName string) bool
- func (d *MainTableOwnershipPolicy) IfaceShouldHaveGracePeriod(ifaceName string) bool
- func (d *MainTableOwnershipPolicy) RouteIsOurs(ifaceName string, route *netlink.Route) bool
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
Click to show internal directories.
Click to hide internal directories.