Documentation ¶
Index ¶
- Constants
- func DeepCopyNodeInfo(nodeInfo *framework.NodeInfo) *framework.NodeInfo
- func FilterOutExpendableAndSplit(unschedulableCandidates []*apiv1.Pod, nodes []*apiv1.Node, ...) ([]*apiv1.Pod, []*apiv1.Pod)
- func FilterOutExpendablePods(pods []*apiv1.Pod, expendablePodsPriorityCutoff int) []*apiv1.Pod
- func FilterOutNodesFromNotAutoscaledGroups(nodes []*apiv1.Node, cloudProvider cloudprovider.CloudProvider) ([]*apiv1.Node, errors.AutoscalerError)
- func GetNodeCoresAndMemory(node *apiv1.Node) (int64, int64)
- func GetNodeInfoFromTemplate(nodeGroup cloudprovider.NodeGroup, daemonsets []*appsv1.DaemonSet, ...) (*framework.NodeInfo, errors.AutoscalerError)
- func GetOldestCreateTime(pods []*apiv1.Pod) time.Time
- func GetOldestCreateTimeWithGpu(pods []*apiv1.Pod) (bool, time.Time)
- func GetStringFromChan(c chan string) string
- func GetStringFromChanImmediately(c chan string) string
- func IsExpendablePod(pod *apiv1.Pod, expendablePodsPriorityCutoff int) bool
- func SanitizeNode(node *apiv1.Node, nodeGroup string, taintConfig taints.TaintConfig) (*apiv1.Node, errors.AutoscalerError)
- func SanitizePods(pods []*framework.PodInfo, sanitizedNode *apiv1.Node) []*framework.PodInfo
- func UpdateClusterStateMetrics(csr *clusterstate.ClusterStateRegistry)
Constants ¶
const MiB = 1024 * 1024
MiB represents megabate (2^20) multiplier
const NothingReturned = "Nothing returned"
NothingReturned is a no-value marker returned by GetStringFromChan and GetStringFromChanImmediately functions
Variables ¶
This section is empty.
Functions ¶
func DeepCopyNodeInfo ¶
DeepCopyNodeInfo clones the provided nodeInfo
func FilterOutExpendableAndSplit ¶
func FilterOutExpendableAndSplit(unschedulableCandidates []*apiv1.Pod, nodes []*apiv1.Node, expendablePodsPriorityCutoff int) ([]*apiv1.Pod, []*apiv1.Pod)
FilterOutExpendableAndSplit filters out expendable pods and splits into:
- waiting for lower priority pods preemption
- other pods.
func FilterOutExpendablePods ¶
FilterOutExpendablePods filters out expendable pods.
func FilterOutNodesFromNotAutoscaledGroups ¶
func FilterOutNodesFromNotAutoscaledGroups(nodes []*apiv1.Node, cloudProvider cloudprovider.CloudProvider) ([]*apiv1.Node, errors.AutoscalerError)
FilterOutNodesFromNotAutoscaledGroups return subset of input nodes for which cloud provider does not return autoscaled node group.
func GetNodeCoresAndMemory ¶
GetNodeCoresAndMemory extracts cpu and memory resources out of Node object
func GetNodeInfoFromTemplate ¶
func GetNodeInfoFromTemplate(nodeGroup cloudprovider.NodeGroup, daemonsets []*appsv1.DaemonSet, taintConfig taints.TaintConfig) (*framework.NodeInfo, errors.AutoscalerError)
GetNodeInfoFromTemplate returns NodeInfo object built base on TemplateNodeInfo returned by NodeGroup.TemplateNodeInfo().
func GetOldestCreateTime ¶
GetOldestCreateTime returns oldest creation time out of the pods in the set
func GetOldestCreateTimeWithGpu ¶
GetOldestCreateTimeWithGpu returns oldest creation time out of pods with GPU in the set
func GetStringFromChan ¶
GetStringFromChan returns a value from channel or NothingReturned if no value in channel after timeout of 100 ms.
func GetStringFromChanImmediately ¶
GetStringFromChanImmediately returns a value from channel or NothingReturned if no value in channel.
func IsExpendablePod ¶
IsExpendablePod tests if pod is expendable for give priority cutoff
func SanitizeNode ¶
func SanitizeNode(node *apiv1.Node, nodeGroup string, taintConfig taints.TaintConfig) (*apiv1.Node, errors.AutoscalerError)
SanitizeNode cleans up nodes used for node group templates
func SanitizePods ¶
SanitizePods cleans up pods used for node group templates
func UpdateClusterStateMetrics ¶
func UpdateClusterStateMetrics(csr *clusterstate.ClusterStateRegistry)
UpdateClusterStateMetrics updates metrics related to cluster state
Types ¶
This section is empty.