node

package
Version: v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NodeFromOpts

func NodeFromOpts(c Opts) *v1.Node

func Run

Types

type NodeProvider

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

NodeProvider accepts a callback from virtual-kubelet's node controller, and exposes it to our upstream resources controller, for node status updates. If we updated node status directly, without informing virtual-kubelet, virtual-kubelet would override our changes every minute (with node leases enabled; more often otherwise); which would trigger a reconcile on our end, and another override on vk's end, etc. (controllers disagreeing). When virtual-kubelet is notified of what we think the node status should be, it keeps it in memory, and call kube-apiserver on our behalf.

func (*NodeProvider) NotifyNodeStatus

func (p *NodeProvider) NotifyNodeStatus(ctx context.Context, cb func(*corev1.Node))

func (*NodeProvider) Ping

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

func (*NodeProvider) UpdateNodeStatus

func (p *NodeProvider) UpdateNodeStatus(node *corev1.Node)

type Opts

type Opts struct {
	NodeName        string
	EnableNodeLease bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto