node

package
v1.13.3-k3s1 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrCloudInstance occurs when the cloud provider does not support
	// the Instances API.
	ErrCloudInstance = errors.New("cloud provider doesn't support instances")
)

Functions

func CreateAddNodeHandler

func CreateAddNodeHandler(f func(node *v1.Node) error) func(obj interface{})

CreateAddNodeHandler creates an add node handler.

func CreateDeleteNodeHandler

func CreateDeleteNodeHandler(f func(node *v1.Node) error) func(obj interface{})

CreateDeleteNodeHandler creates a delete node handler. (Common to lifecycle and ipam)

func CreateUpdateNodeHandler

func CreateUpdateNodeHandler(f func(oldNode, newNode *v1.Node) error) func(oldObj, newObj interface{})

CreateUpdateNodeHandler creates a node update handler. (Common to lifecycle and ipam)

func DeletePods

func DeletePods(kubeClient clientset.Interface, recorder record.EventRecorder, nodeName, nodeUID string, daemonStore extensionslisters.DaemonSetLister) (bool, error)

DeletePods will delete all pods from master running on given node, and return true if any pods were deleted, or were found pending deletion.

func ForcefullyDeleteNode

func ForcefullyDeleteNode(kubeClient clientset.Interface, nodeName string) error

ForcefullyDeleteNode deletes the node immediately. The pods on the node are cleaned up by the podGC.

func MarkAllPodsNotReady

func MarkAllPodsNotReady(kubeClient clientset.Interface, node *v1.Node) error

MarkAllPodsNotReady updates ready status of all pods running on given node from master return true if success

func RecordNodeEvent

func RecordNodeEvent(recorder record.EventRecorder, nodeName, nodeUID, eventtype, reason, event string)

RecordNodeEvent records a event related to a node.

func RecordNodeStatusChange

func RecordNodeStatusChange(recorder record.EventRecorder, node *v1.Node, newStatus string)

RecordNodeStatusChange records a event related to a node status change. (Common to lifecycle and ipam)

func SetPodTerminationReason

func SetPodTerminationReason(kubeClient clientset.Interface, pod *v1.Pod, nodeName string) (*v1.Pod, error)

SetPodTerminationReason attempts to set a reason and message in the pod status, updates it in the apiserver, and returns an error if it encounters one.

func SwapNodeControllerTaint

func SwapNodeControllerTaint(kubeClient clientset.Interface, taintsToAdd, taintsToRemove []*v1.Taint, node *v1.Node) bool

SwapNodeControllerTaint returns true in case of success and false otherwise.

Types

This section is empty.

Jump to

Keyboard shortcuts

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