networking

package
v0.8.8 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 42 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ControllerNetworkStatus = "NetworkStatus"
	IndexerFieldNetwork     = "network"
)
View Source
const (
	ReasonIPAllocationSucceed = "IPAllocationSucceed"
	ReasonIPAllocationFail    = "IPAllocationFail"
	ReasonIPReleaseSucceed    = "IPReleaseSucceed"
	ReasonIPReserveSucceed    = "IPReserveSucceed"
)
View Source
const (
	IndexerFieldMAC   = "mac"
	IndexerFieldNode  = "node"
	OverlayNodeName   = "c3e6699d28e7"
	GlobalBGPNodeName = "d7afdca2c149"
)
View Source
const ControllerIPAM = "IPAM"
View Source
const ControllerIPInstance = "IPInstance"
View Source
const ControllerNode = "Node"
View Source
const ControllerPod = "Pod"
View Source
const ControllerQuota = "Quota"
View Source
const ControllerSubnetStatus = "SubnetStatus"

Variables

This section is empty.

Functions

func IPSetGetter

func IPSetGetter(ctx context.Context, c client.Reader) manager.IPSetGetter

func InitIndexers added in v0.5.0

func InitIndexers(mgr ctrl.Manager) (err error)

func NetworkGetter

func NetworkGetter(ctx context.Context, c client.Reader) manager.NetworkGetter

func RegisterToManager added in v0.6.0

func RegisterToManager(ctx context.Context, mgr manager.Manager, options RegisterOptions) error

func SubnetGetter

func SubnetGetter(ctx context.Context, c client.Reader) manager.SubnetGetter

Types

type IPAMManager

type IPAMManager interface {
	ipam.Manager
}

func NewIPAMManager

func NewIPAMManager(ctx context.Context, c client.Client) (IPAMManager, error)

type IPAMReconciler

type IPAMReconciler struct {
	client.Client

	IPAMManager IPAMManager

	NetworkStatusUpdateChan chan<- event.GenericEvent
	SubnetStatusUpdateChan  chan<- event.GenericEvent

	concurrency.ControllerConcurrency
}

IPAMReconciler reconciles IPAM Manager

func (*IPAMReconciler) Reconcile

func (r *IPAMReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*IPAMReconciler) SetupWithManager

func (r *IPAMReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type IPAMStore

type IPAMStore interface {
	ipam.Store
}

func NewIPAMStore

func NewIPAMStore(c client.Client) IPAMStore

type IPInstanceReconciler

type IPInstanceReconciler struct {
	client.Client

	// TODO: construct
	PodIPCache  PodIPCache
	IPAMManager IPAMManager
	IPAMStore   IPAMStore

	concurrency.ControllerConcurrency
}

IPInstanceReconciler reconciles a IPInstance object

func (*IPInstanceReconciler) Reconcile

func (r *IPInstanceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*IPInstanceReconciler) SetupWithManager

func (r *IPInstanceReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type NetworkStatusReconciler

type NetworkStatusReconciler struct {
	context.Context
	client.Client

	IPAMManager IPAMManager
	Recorder    record.EventRecorder

	NetworkStatusUpdateChan <-chan event.GenericEvent

	concurrency.ControllerConcurrency
}

NetworkStatusReconciler reconciles status of network objects

func (*NetworkStatusReconciler) Reconcile

func (r *NetworkStatusReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)

func (*NetworkStatusReconciler) SetupWithManager

func (r *NetworkStatusReconciler) SetupWithManager(mgr ctrl.Manager) (err error)

SetupWithManager sets up the controller with the Manager.

type NewIPAMManagerFunction added in v0.6.0

type NewIPAMManagerFunction func(context.Context, client.Client) (IPAMManager, error)

type NodeReconciler

NodeReconciler reconciles a Node object

func (*NodeReconciler) Reconcile

func (r *NodeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*NodeReconciler) SetupWithManager

func (r *NodeReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type PodIPCache added in v0.5.0

type PodIPCache interface {
	Record(podUID types.UID, podName, namespace string, ipInstanceNames []string)
	ReleaseIP(ipInstanceName, namespace string)
	ReleasePod(podName, namespace string)
	Get(podName, namespace string) (bool, types.UID, []string)
}

func NewPodIPCache added in v0.5.0

func NewPodIPCache(ctx context.Context, c client.Reader, logger logr.Logger) (PodIPCache, error)

type PodReconciler

type PodReconciler struct {
	APIReader client.Reader
	client.Client

	Recorder record.EventRecorder

	PodIPCache  PodIPCache
	IPAMStore   IPAMStore
	IPAMManager IPAMManager

	concurrency.ControllerConcurrency
}

PodReconciler reconciles a Pod object

func (*PodReconciler) Reconcile

func (r *PodReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)

func (*PodReconciler) SetupWithManager

func (r *PodReconciler) SetupWithManager(mgr ctrl.Manager) (err error)

SetupWithManager sets up the controller with the Manager.

type QuotaReconciler

type QuotaReconciler struct {
	context.Context
	client.Client

	concurrency.ControllerConcurrency
}

QuotaReconciler reconciles quota labels on node

func (*QuotaReconciler) Reconcile

func (r *QuotaReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)

func (*QuotaReconciler) SetupWithManager

func (r *QuotaReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type RegisterOptions added in v0.6.0

type RegisterOptions struct {
	NewIPAMManager NewIPAMManagerFunction
	ConcurrencyMap map[string]int
}

type SubnetStatusReconciler

type SubnetStatusReconciler struct {
	client.Client

	IPAMManager IPAMManager
	Recorder    record.EventRecorder

	SubnetStatusUpdateChan <-chan event.GenericEvent

	concurrency.ControllerConcurrency
}

SubnetStatusReconciler reconciles a Subnet object

func (*SubnetStatusReconciler) Reconcile

func (r *SubnetStatusReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)

func (*SubnetStatusReconciler) SetupWithManager

func (r *SubnetStatusReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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