mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
Implement noopWindowsResourceAllocator
On Windows, the podAdmitHandler returned by the GetAllocateResourcesPodAdmitHandler() func and registered by the Kubelet is nil. We implement a noopWindowsResourceAllocator that would admit any pod for Windows in order to be consistent with the original implementation.
This commit is contained in:
parent
61847eab61
commit
a9f834d17d
@ -54,6 +54,14 @@ type containerManagerImpl struct {
|
|||||||
nodeConfig NodeConfig
|
nodeConfig NodeConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type noopWindowsResourceAllocator struct{}
|
||||||
|
|
||||||
|
func (ra *noopWindowsResourceAllocator) Admit(attrs *lifecycle.PodAdmitAttributes) lifecycle.PodAdmitResult {
|
||||||
|
return lifecycle.PodAdmitResult{
|
||||||
|
Admit: true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (cm *containerManagerImpl) Start(node *v1.Node,
|
func (cm *containerManagerImpl) Start(node *v1.Node,
|
||||||
activePods ActivePodsFunc,
|
activePods ActivePodsFunc,
|
||||||
sourcesReady config.SourcesReady,
|
sourcesReady config.SourcesReady,
|
||||||
@ -178,7 +186,7 @@ func (cm *containerManagerImpl) ShouldResetExtendedResourceCapacity() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (cm *containerManagerImpl) GetAllocateResourcesPodAdmitHandler() lifecycle.PodAdmitHandler {
|
func (cm *containerManagerImpl) GetAllocateResourcesPodAdmitHandler() lifecycle.PodAdmitHandler {
|
||||||
return nil
|
return &noopWindowsResourceAllocator{}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cm *containerManagerImpl) UpdateAllocatedDevices() {
|
func (cm *containerManagerImpl) UpdateAllocatedDevices() {
|
||||||
|
Loading…
Reference in New Issue
Block a user