controllers

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2020 License: Apache-2.0, BSD-3-Clause, MIT Imports: 20 Imported by: 7

Documentation

Index

Constants

View Source
const CMD_UPDATE = "update"
View Source
const IPIP_CONFIGURE = "configure"
View Source
const IPIP_NONE = "none"
View Source
const IPIP_SHARED = "shared"
View Source
const IPTAB = "nat"

Variables

This section is empty.

Functions

func BaseController

func BaseController(name string, config config.OptionSource) controller.Configuration

func String

func String(r netlink.Route) string

Types

type Common

type Common struct {
	reconcile.DefaultReconciler
	// contains filtered or unexported fields
}

func NewCommon

func NewCommon(controller controller.Interface) Common

func (*Common) Controller

func (this *Common) Controller() controller.Interface
func (this *Common) TriggerLink(name string)

func (*Common) TriggerUpdate

func (this *Common) TriggerUpdate()

type Config

type Config struct {
	NodeCIDR *net.IPNet
	IPIP     string
	// contains filtered or unexported fields
}

func (*Config) AddOptionsToSet

func (this *Config) AddOptionsToSet(set config.OptionSet)

func (*Config) OptionalCIDR

func (this *Config) OptionalCIDR(s, name string) (net.IP, *net.IPNet, error)

func (*Config) Prepare

func (this *Config) Prepare() error

func (*Config) RequireCIDR

func (this *Config) RequireCIDR(s, name string) (net.IP, *net.IPNet, error)

type Reconciler

type Reconciler struct {
	Common
	IPT *iptables.IPTables
	// contains filtered or unexported fields
}

func CreateBaseReconciler

func CreateBaseReconciler(controller controller.Interface, impl ReconcilerImplementation) (*Reconciler, error)

func (*Reconciler) Command

func (this *Reconciler) Command(logger logger.LogContext, cmd string) reconcile.Status

func (*Reconciler) Config

func (this *Reconciler) Config() config.OptionSource

func (*Reconciler) Delete

func (this *Reconciler) Delete(logger logger.LogContext, obj resources.Object) reconcile.Status

func (*Reconciler) Deleted

func (this *Reconciler) Links() *kubelink.Links

func (*Reconciler) NodeInterface

func (this *Reconciler) NodeInterface() *kubelink.NodeInterface

func (*Reconciler) Reconcile

func (this *Reconciler) Reconcile(logger logger.LogContext, obj resources.Object) reconcile.Status
func (this *Reconciler) ReconcileAngGetLink(logger logger.LogContext, obj resources.Object,
	updater func(logger logger.LogContext, link *v1alpha1.KubeLink, entry *kubelink.Link) (error, error)) (*kubelink.Link, reconcile.Status)
func (this *Reconciler) ReconcileLink(logger logger.LogContext, obj resources.Object,
	updater func(logger logger.LogContext, link *v1alpha1.KubeLink, entry *kubelink.Link) (error, error)) reconcile.Status

func (*Reconciler) Setup

func (this *Reconciler) Setup()

func (*Reconciler) SetupIPIP

func (this *Reconciler) SetupIPIP() error

func (*Reconciler) Start

func (this *Reconciler) Start()

func (*Reconciler) WaitIPIP

func (this *Reconciler) WaitIPIP()

func (*Reconciler) WaitNetworkReady

func (this *Reconciler) WaitNetworkReady()

type ReconcilerImplementation

type ReconcilerImplementation interface {
	IsManagedRoute(*netlink.Route, kubelink.Routes) bool
	RequiredRoutes() kubelink.Routes
	RequiredSNATRules() iptables.Requests
	Config(interface{}) *Config

	Gateway(obj *v1alpha1.KubeLink) (net.IP, error)
	UpdateGateway(link *v1alpha1.KubeLink) *string
}

type StatusUpdater

type StatusUpdater func(obj *v1alpha1.KubeLink, err error) (bool, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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