Documentation ¶
Index ¶
- Constants
- 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 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 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 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 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 UpdateClusterStateMetrics ¶
func UpdateClusterStateMetrics(csr *clusterstate.ClusterStateRegistry)
UpdateClusterStateMetrics updates metrics related to cluster state
Types ¶
This section is empty.