node

package
v1.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeletePods

func DeletePods(kubeClient clientset.Interface, pods []*v1.Pod, recorder record.EventRecorder, nodeName, nodeUID string, daemonStore appsv1listers.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 GetNodeCondition

func GetNodeCondition(status *v1.NodeStatus, conditionType v1.NodeConditionType) (int, *v1.NodeCondition)

GetNodeCondition extracts the provided condition from the given status and returns that. Returns nil and -1 if the condition is not present, and the index of the located condition.

func Pod

func Pod(pod *v1.Pod) string

Pod returns a string representing a pod in a consistent human readable format, with pod UID as part of the string.

func PodDesc

func PodDesc(podName, podNamespace string, podUID types.UID) string

PodDesc returns a string representing a pod in a consistent human readable format, with pod UID as part of the string.

func RecordNodeEvent

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

RecordNodeEvent records a event related to a node.

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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