Documentation
¶
Index ¶
- Variables
- func AddOrUpdateLabelsOnNode(kubeClient clientset.Interface, labelsToUpdate map[string]string, ...) bool
- func CreateAddNodeHandler(f func(node *v1.Node) error) func(obj interface{})
- func CreateDeleteNodeHandler(f func(node *v1.Node) error) func(obj interface{})
- func CreateUpdateNodeHandler(f func(oldNode, newNode *v1.Node) error) func(oldObj, newObj interface{})
- func DeletePods(kubeClient clientset.Interface, pods []*v1.Pod, recorder record.EventRecorder, ...) (bool, error)
- func GetNodeCondition(status *v1.NodeStatus, conditionType v1.NodeConditionType) (int, *v1.NodeCondition)
- func GetPodCondition(status *v1.PodStatus, conditionType v1.PodConditionType) (int, *v1.PodCondition)
- func GetPodConditionFromList(conditions []v1.PodCondition, conditionType v1.PodConditionType) (int, *v1.PodCondition)
- func MarkPodsNotReady(kubeClient clientset.Interface, pods []*v1.Pod, nodeName string, node *v1.Node) error
- func RecordNodeEvent(recorder record.EventRecorder, ...)
- func RecordNodeStatusChange(recorder record.EventRecorder, node *v1.Node, newStatus string)
- func SetPodTerminationReason(kubeClient clientset.Interface, pod *v1.Pod, nodeName string) (*v1.Pod, error)
- func SwapNodeControllerTaint(kubeClient clientset.Interface, taintsToAdd, taintsToRemove []*v1.Taint, ...) bool
- func UpdatePodCondition(status *v1.PodStatus, condition *v1.PodCondition) bool
Constants ¶
This section is empty.
Variables ¶
var ( // AnnotationKeyNodeAutonomy is an annotation key for node autonomy. AnnotationKeyNodeAutonomy = projectinfo.GetAutonomyAnnotation() )
Functions ¶
func AddOrUpdateLabelsOnNode ¶
func AddOrUpdateLabelsOnNode(kubeClient clientset.Interface, labelsToUpdate map[string]string, node *v1.Node) bool
AddOrUpdateLabelsOnNode updates the labels on the node and returns true on success and false on failure.
func CreateAddNodeHandler ¶
CreateAddNodeHandler creates an add node handler.
func CreateDeleteNodeHandler ¶
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, 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 GetPodCondition ¶ added in v0.6.0
func GetPodCondition(status *v1.PodStatus, conditionType v1.PodConditionType) (int, *v1.PodCondition)
GetPodCondition 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 GetPodConditionFromList ¶ added in v0.6.0
func GetPodConditionFromList(conditions []v1.PodCondition, conditionType v1.PodConditionType) (int, *v1.PodCondition)
GetPodConditionFromList extracts the provided condition from the given list of condition and returns the index of the condition and the condition. Returns -1 and nil if the condition is not present.
func MarkPodsNotReady ¶
func MarkPodsNotReady(kubeClient clientset.Interface, pods []*v1.Pod, nodeName string, node *v1.Node) error
MarkPodsNotReady updates ready status of given 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.
func UpdatePodCondition ¶ added in v0.6.0
func UpdatePodCondition(status *v1.PodStatus, condition *v1.PodCondition) bool
UpdatePodCondition updates existing pod condition or creates a new one. Sets LastTransitionTime to now if the status has changed. Returns true if pod condition has changed or has been added.
Types ¶
This section is empty.