Change GetTopologyPodAdmitHandler() to be more general
GetTopologyPodAdmitHandler() now returns a lifecycle.PodAdmitHandler type instead of the TopologyManager directly. The handler it returns is generally responsible for attempting to allocate any resources that require a pod admission check. When the TopologyManager feature gate is on, this comes directly from the TopologyManager. When it is off, we simply attempt the allocations ourselves and fail the admission on an unexpected error. The higher level kubelet.go feature gate check will be removed in an upcoming PR.
This commit is contained in:
@@ -117,8 +117,8 @@ func (cm *containerManagerStub) ShouldResetExtendedResourceCapacity() bool {
|
||||
return cm.shouldResetExtendedResourceCapacity
|
||||
}
|
||||
|
||||
func (cm *containerManagerStub) GetTopologyPodAdmitHandler() topologymanager.Manager {
|
||||
return nil
|
||||
func (cm *containerManagerStub) GetTopologyPodAdmitHandler() lifecycle.PodAdmitHandler {
|
||||
return topologymanager.NewFakeManager()
|
||||
}
|
||||
|
||||
func (cm *containerManagerStub) UpdateAllocatedDevices() {
|
||||
|
Reference in New Issue
Block a user