route

package
v0.0.0-...-6b9ae1e Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2019 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

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[types.NodeName]*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) 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