Documentation
¶
Index ¶
- func AddEvictionAnnotation(config *config.Configuration) error
- func DeleteNodeOverSoldStatus(config *config.Configuration) error
- func DisableSchedule(config *config.Configuration) error
- func GetAnnotationOverSubscription(node *v1.Node) apis.Resource
- func GetIntValueWaterMark(annotations map[string]string, annotationKey string) (intValue int64, exist bool, err error)
- func GetNodeStatusOverSubscription(node *v1.Node) apis.Resource
- func GetTotalNodeResource(node *v1.Node, includeOverSubscription bool) v1.ResourceList
- func IsNodeSupportColocation(node *corev1.Node) bool
- func IsNodeSupportOverSubscription(node *corev1.Node) bool
- func IsOverused(resName v1.ResourceName, resList *ResourceList) bool
- func RecoverSchedule(config *config.Configuration) error
- func RemoveEvictionAnnotation(config *config.Configuration) error
- func ResetOverSubNativeResource(config *config.Configuration) error
- func ResetOverSubscriptionInfoAndRemoveEvictionAnnotation(config *config.Configuration) error
- func SetOverSubscriptionLabel(config *config.Configuration) error
- func UpdateNodeExtendResource(config *config.Configuration, res apis.Resource) error
- func UpdateNodeResourceToAnnotation(config *config.Configuration, res apis.Resource) error
- func UseExtendResource(resName v1.ResourceName, resList *ResourceList) bool
- func WatermarkAnnotationSetting(node *corev1.Node) (apis.Resource, apis.Resource, bool, error)
- type ActiveNode
- type Modifier
- type ResourceList
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 ¶
GetAnnotationOverSubscription get current overSubscription resources on annotation.
func GetIntValueWaterMark ¶
func GetNodeStatusOverSubscription ¶
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 IsNodeSupportOverSubscription ¶
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
Types ¶
type ActiveNode ¶
ActiveNode returns node which is managed by kubelet
type Modifier ¶
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)