node

package
v1.16.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 18 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEvictionAnnotation

func AddEvictionAnnotation(config *config.Configuration) error

func DeleteNodeOverSoldStatus

func DeleteNodeOverSoldStatus(config *config.Configuration) error

func DisableSchedule

func DisableSchedule(config *config.Configuration) error

func GetAnnotationOverSubscription

func GetAnnotationOverSubscription(node *v1.Node) apis.Resource

GetAnnotationOverSubscription get current overSubscription resources on annotation.

func GetIntValueWaterMark

func GetIntValueWaterMark(annotations map[string]string, annotationKey string) (intValue int64, exist bool, err error)

func GetNodeStatusOverSubscription

func GetNodeStatusOverSubscription(node *v1.Node) apis.Resource

GetNodeStatusOverSubscription get node status's overSubscription extend resources.

func GetTotalNodeResource

func GetTotalNodeResource(node *v1.Node, includeOverSubscription bool) v1.ResourceList

GetTotalNodeResource return total allocatable resource on the node, include overSubscription resource if include OverSubscription=true

func IsNodeSupportColocation

func IsNodeSupportColocation(node *corev1.Node) bool

func IsNodeSupportOverSubscription

func IsNodeSupportOverSubscription(node *corev1.Node) bool

IsNodeSupportOverSubscription return whether a node is over subscription node. IMPORTANT!!! When node has a overSubscription label, it indicates that node is a colocation node too, because overSubscription resources are used by low priority workloads, it must be used in colocation case.

func IsOverused

func IsOverused(resName v1.ResourceName, resList *ResourceList) bool

func RecoverSchedule

func RecoverSchedule(config *config.Configuration) error

func RemoveEvictionAnnotation

func RemoveEvictionAnnotation(config *config.Configuration) error

func ResetOverSubNativeResource

func ResetOverSubNativeResource(config *config.Configuration) error

ResetOverSubNativeResource do following things: 1.set overSubscription label=false to disable NodeResourcesProbe and handler(IMPORTANT!) 2.set oversold resources = 0 on annotation

func ResetOverSubscriptionInfoAndRemoveEvictionAnnotation

func ResetOverSubscriptionInfoAndRemoveEvictionAnnotation(config *config.Configuration) error

ResetOverSubscriptionInfoAndRemoveEvictionAnnotation reset overSubscription info and remove eviction annotation.

func SetOverSubscriptionLabel

func SetOverSubscriptionLabel(config *config.Configuration) error

SetOverSubscriptionLabel set node label "volcano.sh/oversubscription"=true

func UpdateNodeExtendResource

func UpdateNodeExtendResource(config *config.Configuration, res apis.Resource) error

UpdateNodeExtendResource update node extend resource in node status.

func UpdateNodeResourceToAnnotation

func UpdateNodeResourceToAnnotation(config *config.Configuration, res apis.Resource) error

UpdateNodeResourceToAnnotation update oversold resources on annotation.

func UseExtendResource

func UseExtendResource(resName v1.ResourceName, resList *ResourceList) bool

func WatermarkAnnotationSetting

func WatermarkAnnotationSetting(node *corev1.Node) (apis.Resource, apis.Resource, bool, error)

WatermarkAnnotationSetting return watermark setting in annotation. return params lowWatermark, highWatermark, whether annotation exits and error

Types

type ActiveNode

type ActiveNode func() (*corev1.Node, error)

ActiveNode returns node which is managed by kubelet

type Modifier

type Modifier func(*v1.Node)

func ResetOverSubscriptionLabel

func ResetOverSubscriptionLabel() Modifier

type ResourceList

type ResourceList struct {
	TotalPodsRequest corev1.ResourceList
	TotalNodeRes     corev1.ResourceList
}

func GetLatestPodsAndResList

func GetLatestPodsAndResList(node *v1.Node, getPodFunc utilpod.ActivePods, resType v1.ResourceName) ([]*v1.Pod, *ResourceList, error)

Jump to

Keyboard shortcuts

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