node

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

View Source
const (
	APICallRetryInterval = 500 * time.Millisecond
	PatchNodeTimeout     = 2 * time.Minute
)

Variables

This section is empty.

Functions

func AddTaint

func AddTaint(n *v1.Node, t v1.Taint)

func PatchNode

func PatchNode(ctx context.Context, client clientset.Interface, nodeName string, patchFn func(*v1.Node)) error

PatchNode tries to patch a node using patchFn for the actual mutating logic. Retries are provided by the wait package.

Copied from github.com/kubernetes/kubernetes/cmd/kubeadm/app/util/apiclient

func PatchNodeOnce

func PatchNodeOnce(ctx context.Context, client clientset.Interface, nodeName string, patchFn func(*v1.Node)) func() (bool, error)

PatchNodeOnce executes patchFn on the node object found by the node name. This is a condition function meant to be used with wait.Poll. false, nil implies it is safe to try again, an error indicates no more tries should be made and true indicates success.

Copied from github.com/kubernetes/kubernetes/cmd/kubeadm/app/util/apiclient

func PatchNodeWithContext

func PatchNodeWithContext(ctx context.Context, client clientset.Interface, nodeName string, patchFn func(*v1.Node)) error

func TaintExists

func TaintExists(node *v1.Node, taint v1.Taint) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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