For each of these resources, a pod that doesn't request the resource explicitly will be treated as having requested the amount indicated below, for the purpose of computing priority only. This ensures that when scheduling zero-request pods, such pods will not all be scheduled to the machine with the smallest in-use request, and that when scheduling regular pods, such pods will not see zero-request pods as consuming no resources whatsoever. We chose these values to be similar to the resources that we give to cluster addon pods (#10653). But they are pretty arbitrary. As described in #11713, we use request instead of limit to deal with resource requirements.
GetNamespacesFromPodAffinityTerm returns a set of names according to the namespaces indicated in podAffinityTerm. If namespaces is empty it considers the given pod's namespace.
GetNonzeroRequests returns the default resource request if none is found or what is provided on the request.
NodesHaveSameTopologyKey checks if nodeA and nodeB have same label value with given topologyKey as label key. Returns false if topologyKey is empty.
PodMatchesTermsNamespaceAndSelector returns true if the given <pod> matches the namespace and selector defined by <affinityPod>`s <term>.
Topologies contains topologies information of nodes.
NodesHaveSameTopologyKey checks if nodeA and nodeB have same label value with given topologyKey as label key.