package
1.14.0-alpha.0
Repository: https://github.com/linxiulei/kubernetes.git
Documentation: pkg.go.dev

# Functions

AddUnsetLabelsToMap backfills missing values with values we find in a map.
CheckNodeConditionPredicate checks if a pod can be scheduled on a node reporting out of disk, network unavailable and not ready condition.
CheckNodeDiskPressurePredicate checks if a pod can be scheduled on a node reporting disk pressure condition.
CheckNodeMemoryPressurePredicate checks if a pod can be scheduled on a node reporting memory pressure condition.
CheckNodePIDPressurePredicate checks if a pod can be scheduled on a node reporting pid pressure condition.
CheckNodeUnschedulablePredicate checks if a pod can be scheduled on a node with Unschedulable spec.
CreateSelectorFromLabels is used to define a selector that corresponds to the keys in a map.
EssentialPredicates are the predicates that all pods, including critical pods, need.
FilterPodsByNamespace filters pods outside a namespace from the given list.
FindLabelsInSet gets as many key/value pairs as possible out of a label set.
GeneralPredicates checks whether noncriticalPredicates and EssentialPredicates pass.
GetPodAffinityTerms gets pod affinity terms by a pod affinity object.
GetPodAntiAffinityTerms gets pod affinity terms by a pod anti-affinity.
GetResourceRequest returns a *schedulercache.Resource that covers the largest width in each resource dimension.
NewCSIMaxVolumeLimitPredicate returns a predicate for counting CSI volumes.
NewFailureReason creates a FailureReason with message.
NewInsufficientResourceError returns an InsufficientResourceError.
NewMaxPDVolumeCountPredicate creates a predicate which evaluates whether a pod can fit based on the number of volumes which match a filter that it requests, and those that are already present.
NewNodeLabelPredicate creates a predicate which evaluates whether a pod can fit based on the node labels which match a filter that it requests.
NewPodAffinityPredicate creates a PodAffinityChecker.
NewPredicateMetadataFactory creates a PredicateMetadataFactory.
NewServiceAffinityPredicate creates a ServiceAffinity.
NewVolumeBindingPredicate evaluates if a pod can fit due to the volumes it requests, for both bound and unbound PVCs.
NewVolumeZonePredicate evaluates if a pod can fit due to the volumes it requests, given that some volumes may have zone scheduling constraints.
NoDiskConflict evaluates if a pod can fit due to the volumes it requests, and those that are already mounted.
Ordering returns the ordering of predicates.
PodFitsHost checks if a pod spec node name matches the current node.
PodFitsHostPorts checks if a node has free ports for the requested pod ports.
PodFitsResources checks if a node has sufficient resources, such as cpu, memory, gpu, opaque int resources etc to run a pod.
PodMatchNodeSelector checks if a pod node selector matches the node label.
PodToleratesNodeNoExecuteTaints checks if a pod tolerations can tolerate the node's NoExecute taints.
PodToleratesNodeTaints checks if a pod tolerations can tolerate the node taints.
RegisterPredicateMetadataProducer registers a PredicateMetadataProducer.
RegisterPredicateMetadataProducerWithExtendedResourceOptions registers a PredicateMetadataProducer that creates predicate metadata with the provided options for extended resources.
SetPredicatesOrdering sets the ordering of predicates.

# Constants

AzureDiskVolumeFilterType defines the filter name for AzureDiskVolumeFilter.
CheckNodeConditionPred defines the name of predicate CheckNodeCondition.
CheckNodeDiskPressurePred defines the name of predicate CheckNodeDiskPressure.
CheckNodeLabelPresencePred defines the name of predicate CheckNodeLabelPresence.
CheckNodeMemoryPressurePred defines the name of predicate CheckNodeMemoryPressure.
CheckNodePIDPressurePred defines the name of predicate CheckNodePIDPressure.
CheckNodeUnschedulablePred defines the name of predicate CheckNodeUnschedulablePredicate.
CheckServiceAffinityPred defines the name of predicate checkServiceAffinity.
CheckVolumeBindingPred defines the name of predicate CheckVolumeBinding.
DefaultMaxAzureDiskVolumes defines the maximum number of PD Volumes for Azure Larger Azure VMs can actually have much more disks attached.
DefaultMaxGCEPDVolumes defines the maximum number of PD Volumes for GCE GCE instances can have up to 16 PD volumes attached.
EBSVolumeFilterType defines the filter name for EBSVolumeFilter.
GCEPDVolumeFilterType defines the filter name for GCEPDVolumeFilter.
GeneralPred defines the name of predicate GeneralPredicates.
HostNamePred defines the name of predicate HostName.
KubeMaxPDVols defines the maximum number of PD Volumes per kubelet.
MatchInterPodAffinityPred defines the name of predicate MatchInterPodAffinity.
MatchNodeSelectorPred defines the name of predicate MatchNodeSelector.
MaxAzureDiskVolumeCountPred defines the name of predicate MaxAzureDiskVolumeCount.
MaxCSIVolumeCountPred defines the predicate that decides how many CSI volumes should be attached.
MaxEBSVolumeCountPred defines the name of predicate MaxEBSVolumeCount.
MaxGCEPDVolumeCountPred defines the name of predicate MaxGCEPDVolumeCount.
NoDiskConflictPred defines the name of predicate NoDiskConflict.
NoVolumeZoneConflictPred defines the name of predicate NoVolumeZoneConflict.
PodFitsHostPortsPred defines the name of predicate PodFitsHostPorts.
PodFitsResourcesPred defines the name of predicate PodFitsResources.
PodToleratesNodeNoExecuteTaintsPred defines the name of predicate PodToleratesNodeNoExecuteTaints.
PodToleratesNodeTaintsPred defines the name of predicate PodToleratesNodeTaints.

# Variables

AzureDiskVolumeFilter is a VolumeFilter for filtering Azure Disk Volumes.
EBSVolumeFilter is a VolumeFilter for filtering AWS ElasticBlockStore Volumes.
ErrDiskConflict is used for NoDiskConflict predicate error.
ErrExistingPodsAntiAffinityRulesNotMatch is used for ExistingPodsAntiAffinityRulesNotMatch predicate error.
ErrFakePredicate is used for test only.
ErrMaxVolumeCountExceeded is used for MaxVolumeCount predicate error.
ErrNodeLabelPresenceViolated is used for CheckNodeLabelPresence predicate error.
ErrNodeNetworkUnavailable is used for NodeNetworkUnavailable predicate error.
ErrNodeNotReady is used for NodeNotReady predicate error.
ErrNodeOutOfDisk is used for NodeOutOfDisk predicate error.
ErrNodeSelectorNotMatch is used for MatchNodeSelector predicate error.
ErrNodeUnderDiskPressure is used for NodeUnderDiskPressure predicate error.
ErrNodeUnderMemoryPressure is used for NodeUnderMemoryPressure predicate error.
ErrNodeUnderPIDPressure is used for NodeUnderPIDPressure predicate error.
ErrNodeUnknownCondition is used for NodeUnknownCondition predicate error.
ErrNodeUnschedulable is used for NodeUnschedulable predicate error.
ErrPodAffinityNotMatch is used for MatchInterPodAffinity predicate error.
ErrPodAffinityRulesNotMatch is used for PodAffinityRulesNotMatch predicate error.
ErrPodAntiAffinityRulesNotMatch is used for PodAntiAffinityRulesNotMatch predicate error.
ErrPodNotFitsHostPorts is used for PodFitsHostPorts predicate error.
ErrPodNotMatchHostName is used for HostName predicate error.
ErrServiceAffinityViolated is used for CheckServiceAffinity predicate error.
ErrTaintsTolerationsNotMatch is used for PodToleratesNodeTaints predicate error.
ErrVolumeBindConflict is used for VolumeBindingNoMatch predicate error.
ErrVolumeNodeConflict is used for VolumeNodeAffinityConflict predicate error.
ErrVolumeZoneConflict is used for NoVolumeZoneConflict predicate error.
GCEPDVolumeFilter is a VolumeFilter for filtering GCE PersistentDisk Volumes.

# Structs

CachedNodeInfo implements NodeInfo.
CachedPersistentVolumeClaimInfo implements PersistentVolumeClaimInfo.
CachedPersistentVolumeInfo implements PersistentVolumeInfo.
CachedStorageClassInfo implements StorageClassInfo.
CSIMaxVolumeLimitChecker defines predicate needed for counting CSI volumes.
FailureReason describes a failure reason.
InsufficientResourceError is an error type that indicates what kind of resource limit is hit and caused the unfitting failure.
MaxPDVolumeCountChecker contains information to check the max number of volumes for a predicate.
NodeLabelChecker contains information to check node labels for a predicate.
PodAffinityChecker contains information to check pod affinity.
PredicateFailureError describes a failure error of predicate.
PredicateMetadataFactory defines a factory of predicate metadata.
ServiceAffinity defines a struct used for create service affinity predicates.
VolumeBindingChecker contains information to check a volume binding.
VolumeFilter contains information on how to filter PD Volumes when checking PD Volume caps.
VolumeZoneChecker contains information to check the volume zone for a predicate.

# Interfaces

NodeInfo interface represents anything that can get node object from node ID.
PersistentVolumeClaimInfo interface represents anything that can get a PVC object in specified namespace with specified name.
PersistentVolumeInfo interface represents anything that can get persistent volume object by PV ID.
StorageClassInfo interface represents anything that can get a storage class object by class name.

# Type aliases

FakeNodeInfo declares a v1.Node type for testing.
FakeNodeListInfo declares a []v1.Node type for testing.
FakePersistentVolumeClaimInfo declares a []v1.PersistentVolumeClaim type for testing.
FakePersistentVolumeInfo declares a []v1.PersistentVolume type for testing.
FakeStorageClassInfo declares a []storagev1.StorageClass type for testing.
PredicateMetadataProducer function produces predicate metadata.