Commit Graph

9 Commits

Author SHA1 Message Date
Kevin Klues
adaa58b6cb Update TopologyManager.Policy.Merge() to return a simple bool
Previously, the verious Merge() policies of the TopologyManager all
eturned their own lifecycle.PodAdmitResult result. However, for
consistency in any failed admits, this is better handled in the
top-level Topology manager, with each policy only returning a boolean
about whether or not they would like to admit the pod or not. This
commit changes the semantics to match this logic.
2020-02-03 17:13:28 +00:00
nolancon
4d76b1c8de Add mergeFilteredHints:
- Move remaining logic from mergeProvidersHints to generic top level
mergeFilteredHints function.
- Add numaNodes as parameter in order to make generic.
- Move single NUMA node specific check to single-numa-node Merge
function.
2020-01-22 09:07:41 +00:00
nolancon
45660fd3a2 Add filterProvidersHints function:
- Move initial 'filtering' functionality to generic function
filterProvidersHints level policy.go.
- Call new function from top level Merge function.
- Rename some variables/parameters to reflect changes.
2020-01-22 08:35:28 +00:00
Adrian Chiris
eda1521562 Make mergeProviderHints policy-specific:
- Remove need to pass policy and numaNodes as arguments
- Remove PolicySingleNUMANode special case check in policy_best_effort
- Add mergeProviderHints base to policy_single_numa_node for upcoming
commit
2020-01-16 08:13:05 +00:00
Adrian Chiris
d95464645c Add Merge() API to TopologyManager Policy abstraction
This abstraction moves the responsibility of merging topology hints to
the individual policies themselves. As part of this, it removes the
CanAdmitPodResult() API from the policy abstraction, and rolls it into a
second return value from Merge()
2019-11-04 18:43:07 +01:00
Adrian Chiris
e72847676f Pass a list of NUMA nodes to the various TopologyManager policies
This is in preparation for a larger refactoring effort that will add a
'Merge()'  API to the TopologyManager policy API.
2019-11-04 18:43:07 +01:00
Adrian Chiris
6fd8a6eb69 Make restricted TopologyManager policy inherit from best-effort policy
These policies only differ on whether they admit the pod or not when a
TopologyHint is preferred or not. As such, the restricted policy should
simply inherit whatever it can from the best effort policy and only
overwrite what is necessary.

This does not matter for now, but will become important when we add a
new 'Merge()' abstraction to a Policy later on.
2019-11-04 18:43:07 +01:00
Kevin Klues
5ed80dadcf Update CanAdmitPodResult() in TopologyManager to take a TopologyHint
Previously it only took a bool, which limited the logic it could perform
to determine if a pod should be admitted or not based on the merged hint
from the policy.
2019-08-30 07:17:17 +01:00
Louise Daly
2fb94231d0 Renaming strict policy to restricted policy
Restricted policy will fail admission of guaranteed pods where
all requested resources are not available on a single NUMA Node
2019-08-22 07:57:55 +01:00