Skip to content

Commit

Permalink
Move windows infeasible resize check into canResizePod
Browse files Browse the repository at this point in the history
  • Loading branch information
tallclair committed Nov 9, 2024
1 parent 591c75e commit 61e6242
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/kubelet/kubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -2830,6 +2830,10 @@ func isPodResizeInProgress(pod *v1.Pod, podStatus *kubecontainer.PodStatus) bool
// pod should hold the desired (pre-allocated) spec.
// Returns true if the resize can proceed.
func (kl *Kubelet) canResizePod(pod *v1.Pod) (bool, v1.PodResizeStatus) {
if goos == "windows" {
return false, v1.PodResizeStatusInfeasible
}

if v1qos.GetPodQOS(pod) == v1.PodQOSGuaranteed && !utilfeature.DefaultFeatureGate.Enabled(features.InPlacePodVerticalScalingExclusiveCPUs) {
if utilfeature.DefaultFeatureGate.Enabled(features.CPUManager) {
if kl.containerManager.GetNodeConfig().CPUManagerPolicy == "static" {
Expand Down Expand Up @@ -2891,10 +2895,6 @@ func (kl *Kubelet) handlePodResourcesResize(pod *v1.Pod, podStatus *kubecontaine
// Pod allocation does not need to be updated.
return allocatedPod, nil
}
if goos == "windows" {
kl.statusManager.SetPodResizeStatus(pod.UID, v1.PodResizeStatusInfeasible)
return allocatedPod, nil
}

kl.podResizeMutex.Lock()
defer kl.podResizeMutex.Unlock()
Expand Down

0 comments on commit 61e6242

Please sign in to comment.