liqonodeprovider

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Overview

Package liqonodeprovider implements the VirtualKubelet NodeProvider interface, it manages the node status monitoring the status of the Liqo resources (i.e. TunnelEndpoints, Advertisements and ResourceOffers)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnknownNodeConditions

func UnknownNodeConditions() []corev1.NodeCondition

UnknownNodeConditions returns an array of node conditions with all unknown status.

func UpdateNodeCondition

func UpdateNodeCondition(node *corev1.Node, conditionType corev1.NodeConditionType, conditionStatus func() (corev1.ConditionStatus, string, string))

UpdateNodeCondition updates the specified node condition, depending on the outcome of the specified function.

Types

type InitConfig added in v0.3.1

type InitConfig struct {
	HomeConfig      *rest.Config
	RemoteConfig    *rest.Config
	HomeClusterID   string
	RemoteClusterID string
	Namespace       string

	NodeName         string
	InternalIP       string
	DaemonPort       uint16
	Version          string
	ExtraLabels      map[string]string
	ExtraAnnotations map[string]string

	PodProviderStopper   chan struct{}
	InformerResyncPeriod time.Duration
	PingDisabled         bool
}

InitConfig is the config passed to initialize the LiqoNodeProvider.

type LiqoNodeProvider

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

LiqoNodeProvider is a node provider that manages the Liqo resources.

func NewLiqoNodeProvider

func NewLiqoNodeProvider(cfg *InitConfig) *LiqoNodeProvider

NewLiqoNodeProvider creates and returns a new LiqoNodeProvider.

func (*LiqoNodeProvider) GetNode added in v0.3.1

func (p *LiqoNodeProvider) GetNode() *corev1.Node

GetNode returns the node managed by the provider.

func (*LiqoNodeProvider) IsTerminating

func (p *LiqoNodeProvider) IsTerminating() bool

IsTerminating indicates if the node is in terminating (and in the draining phase).

func (*LiqoNodeProvider) NotifyNodeStatus

func (p *LiqoNodeProvider) NotifyNodeStatus(ctx context.Context, f func(*corev1.Node))

NotifyNodeStatus implements the NodeProvider interface.

func (*LiqoNodeProvider) Ping

func (p *LiqoNodeProvider) Ping(ctx context.Context) error

Ping checks if the the node is still active.

func (*LiqoNodeProvider) StartProvider

func (p *LiqoNodeProvider) StartProvider(ctx context.Context) (ready chan struct{})

StartProvider starts the provider with its infromers on Liqo resources. These informers on sharing and network resources will be used to accordingly update the virtual node.

Jump to

Keyboard shortcuts

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