# Functions
AddUnsetLabelsToMap backfills missing values with values we find in a map.
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.
EmptyPredicateMetadataProducer returns a no-op MetadataProducer type.
EssentialPredicates are the predicates that all pods, including critical pods, need.
EvenPodsSpreadPredicate checks if a pod can be scheduled on a node which satisfies its topologySpreadConstraints.
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.
GetPredicateMetadata returns the predicateMetadata which will be used by various predicates.
GetResourceRequest returns a *schedulernodeinfo.Resource that covers the largest width in each resource dimension.
GetVolumeLimitKey returns a ResourceName by filter type.
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.
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.
NodeLabelsMatchSpreadConstraints checks if ALL topology keys in spread constraints are present in node labels.
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.
PodMatchesNodeSelectorAndAffinityTerms checks whether the pod is schedulable onto nodes according to the requirements in both NodeAffinity and nodeSelector.
PodMatchesSpreadConstraint verifies if <constraint.LabelSelector> matches <podLabelSet>.
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.
SetPredicatesOrderingDuringTest sets the predicatesOrdering to the specified value, and returns a function that restores the original value.
UnresolvablePredicateExists checks if there is at least one unresolvable predicate failure reason, if true returns the first one in the list.
# Constants
AzureDiskVolumeFilterType defines the filter name for AzureDiskVolumeFilter.
CheckNodeLabelPresencePred defines the name of predicate CheckNodeLabelPresence.
CheckNodeUnschedulablePred defines the name of predicate CheckNodeUnschedulablePredicate.
CheckServiceAffinityPred defines the name of predicate checkServiceAffinity.
CheckVolumeBindingPred defines the name of predicate CheckVolumeBinding.
CinderVolumeFilterType defines the filter name for CinderVolumeFilter.
DefaultMaxAzureDiskVolumes defines the maximum number of PD Volumes for Azure.
DefaultMaxGCEPDVolumes defines the maximum number of PD Volumes for GCE.
EBSVolumeFilterType defines the filter name for EBSVolumeFilter.
EvenPodsSpreadPred defines the name of predicate EvenPodsSpread.
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.
MaxCinderVolumeCountPred defines the name of predicate MaxCinderDiskVolumeCount.
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.
CinderVolumeFilter is a VolumeFilter for filtering Cinder 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.
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.
ErrTopologySpreadConstraintsNotMatch is used for EvenPodsSpread 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
CachedCSINodeInfo implements CSINodeInfoInfo.
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.
ServiceAffinity defines a struct used for creating 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
CSINodeInfo interface represents anything that can get CSINode object from node name.
InTreeToCSITranslator contains methods required to check migratable status and perform translations from InTree PV's to CSI.
NodeInfo interface represents anything that can get node object from node name.
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.
PredicateFailureReason interface represents the failure reason of a predicate.
PredicateMetadata interface represents anything that can access a predicate metadata.
StorageClassInfo interface represents anything that can get a storage class object by class name.
# Type aliases
FakeCSINodeInfo declares a storagev1beta1.CSINode type for testing.
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.
FitPredicate is a function that indicates if a pod fits into an existing node.
PredicateMetadataProducer is a function that computes predicate metadata for a given pod.