multicluster-scheduler: Index | Files

package node

import ""


Package Files

node.go opts.go provider.go run.go

func NodeFromOpts Uses

func NodeFromOpts(c Opts) *v1.Node

func Run Uses

func Run(ctx context.Context, c Opts, client kubernetes.Interface, p node.NodeProvider) error

type NodeProvider Uses

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 Uses

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

func (*NodeProvider) Ping Uses

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

func (*NodeProvider) UpdateNodeStatus Uses

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

type Opts Uses

type Opts struct {
    NodeName        string
    EnableNodeLease bool

Package node imports 11 packages (graph) and is imported by 1 packages. Updated 2020-09-24. Refresh now. Tools for package owners.