Documentation ¶
Index ¶
- func CheckNodeConditionPred(node *v1.Node) ([]types.PredicateFailureReason, error)
- func ClusterPodRequestScheduling(predPod *v1.Pod, nodeList *v1.NodeList, allrunPods *v1.PodList) *types.ClusterScheduling
- func GeneralPred(node *v1.Node, nodePods []*v1.Pod, pod *v1.Pod) ([]types.PredicateFailureReason, error)
- func GetActivePods(allPods []*v1.Pod) []*v1.Pod
- func ObjectCopy(dst, src interface{}) error
- func PodRequestScheduling(predPod *v1.Pod, nodeList *v1.NodeList, allrunPods *v1.PodList) types.PodRequestScheduling
- func PodToleratesNodeTaintsPred(node *v1.Node, pod *v1.Pod) []types.PredicateFailureReason
- type InsufficientResource
- type InsufficientResourceError
- type NodeConditionError
- type NodeConditionPredicate
- type PodToleratesNodeTaintsError
- type PredicateFailureError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckNodeConditionPred ¶
func CheckNodeConditionPred(node *v1.Node) ([]types.PredicateFailureReason, error)
CheckNodeConditionPred check node ready status.
func GeneralPred ¶
func GeneralPred(node *v1.Node, nodePods []*v1.Pod, pod *v1.Pod) ([]types.PredicateFailureReason, error)
GeneralPred return node resource scheduling status.
func GetActivePods ¶
GetActivePods returns non-terminal pods
func PodRequestScheduling ¶
func PodToleratesNodeTaintsPred ¶
PodToleratesNodeTaintsPred pod tolerates node taints pred.
Types ¶
type InsufficientResource ¶
type InsufficientResource struct { ResourceName v1.ResourceName // We explicitly have a parameter for reason to avoid formatting a message on the fly // for common resources, which is expensive for cluster autoscaler simulations. Reason string Requested int64 Used int64 Capacity int64 }
InsufficientResource describes what kind of resource limit is hit and caused the pod to not fit the node.
func Fits ¶
func Fits(pod *v1.Pod, nodeInfo *schedulernodeinfo.NodeInfo, ignoredExtendedResources sets.String) []InsufficientResource
Fits checks if node have enough resources to host the pod.
type InsufficientResourceError ¶
type InsufficientResourceError struct { ResourceName v1.ResourceName Requested int64 Used int64 Capacity int64 }
InsufficientResourceError is an error type that indicates what kind of resource limit is hit and caused the unfitting failure.
func (*InsufficientResourceError) Error ¶
func (e *InsufficientResourceError) Error() string
func (*InsufficientResourceError) GetInsufficientAmount ¶
func (e *InsufficientResourceError) GetInsufficientAmount() int64
GetInsufficientAmount returns the amount of the insufficient resource of the error.
func (*InsufficientResourceError) GetReason ¶
func (e *InsufficientResourceError) GetReason() string
GetReason returns the reason of the InsufficientResourceError.
type NodeConditionError ¶
NodeConditionError describes a failure error of predicate.
func (*NodeConditionError) Error ¶
func (e *NodeConditionError) Error() string
func (*NodeConditionError) GetReason ¶
func (e *NodeConditionError) GetReason() string
GetReason returns the reason of the NodeConditionError.
type NodeConditionPredicate ¶
NodeConditionPredicate is a function that indicates whether the given node's conditions meet some set of criteria defined by the function.
type PodToleratesNodeTaintsError ¶
PodToleratesNodeTaintsError describes a failure error of predicate.
func (*PodToleratesNodeTaintsError) Error ¶
func (e *PodToleratesNodeTaintsError) Error() string
func (*PodToleratesNodeTaintsError) GetReason ¶
func (e *PodToleratesNodeTaintsError) GetReason() string
GetReason returns the reason of the NodeConditionError.
type PredicateFailureError ¶
PredicateFailureError describes a failure error of predicate.
func (*PredicateFailureError) Error ¶
func (e *PredicateFailureError) Error() string
func (*PredicateFailureError) GetReason ¶
func (e *PredicateFailureError) GetReason() string
GetReason returns the reason of the PredicateFailureError.