route

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

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

Go to latest
Published: Feb 18, 2020 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const NODE_QUEUE = "node.queue"
View Source
const (
	// ROUTE_CONTROLLER route controller name
	ROUTE_CONTROLLER = "route-controller"
)

Variables

View Source
var Options = RoutesOptions{}

Options global options for route controller

Functions

func ContainsCidr

func ContainsCidr(outer string, inner string) (bool, error)

ContainsCidr contains with equal.

func RealContainsCidr

func RealContainsCidr(outer string, inner string) (bool, error)

RealContainsCidr real contains cidr

func RouteCacheMap

func RouteCacheMap(routes []*cloudprovider.Route) map[string]*cloudprovider.Route

RouteCacheMap return cached map for routes

Types

type RouteController

type RouteController struct {
	// contains filtered or unexported fields
}

RouteController response for route reconcile

func New

func New(routes Routes,
	kubeClient clientset.Interface,
	nodeInformer coreinformers.NodeInformer,
	clusterName string, clusterCIDR *net.IPNet) (*RouteController, error)

New new route controller

func (*RouteController) HandlerForNodeDeletion

func (rc *RouteController) HandlerForNodeDeletion(
	que queue.DelayingInterface,
	informer cache.SharedIndexInformer,
)

func (*RouteController) Run

func (rc *RouteController) Run(stopCh <-chan struct{}, syncPeriod time.Duration)

Run start route controller

type Routes

type Routes interface {
	// RouteTables get all available route tables.
	RouteTables(clusterName string) ([]string, error)
	// ListRoutes lists all managed routes that belong to the specified clusterName
	ListRoutes(clusterName string, table string) ([]*cloudprovider.Route, error)
	// CreateRoute creates the described managed route
	// route.Name will be ignored, although the cloud-provider may use nameHint
	// to create a more user-meaningful name.
	CreateRoute(clusterName string, nameHint string, table string, route *cloudprovider.Route) error
	// DeleteRoute deletes the specified managed route
	// Route should be as returned by ListRoutes
	DeleteRoute(clusterName string, table string, route *cloudprovider.Route) error
}

Routes is an abstract, pluggable interface for advanced routing rules.

type RoutesOptions

type RoutesOptions struct {
	AllocateNodeCIDRs         bool
	ClusterCIDR               string
	ConfigCloudRoutes         bool
	MinResyncPeriod           metav1.Duration
	RouteReconciliationPeriod metav1.Duration
	ControllerStartInterval   metav1.Duration
}

RoutesOptions route controller options

Jump to

Keyboard shortcuts

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