Skip to content

Commit 61e6242

Browse files
committed
Move windows infeasible resize check into canResizePod
1 parent 591c75e commit 61e6242

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/kubelet/kubelet.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2830,6 +2830,10 @@ func isPodResizeInProgress(pod *v1.Pod, podStatus *kubecontainer.PodStatus) bool
28302830
// pod should hold the desired (pre-allocated) spec.
28312831
// Returns true if the resize can proceed.
28322832
func (kl *Kubelet) canResizePod(pod *v1.Pod) (bool, v1.PodResizeStatus) {
2833+
if goos == "windows" {
2834+
return false, v1.PodResizeStatusInfeasible
2835+
}
2836+
28332837
if v1qos.GetPodQOS(pod) == v1.PodQOSGuaranteed && !utilfeature.DefaultFeatureGate.Enabled(features.InPlacePodVerticalScalingExclusiveCPUs) {
28342838
if utilfeature.DefaultFeatureGate.Enabled(features.CPUManager) {
28352839
if kl.containerManager.GetNodeConfig().CPUManagerPolicy == "static" {
@@ -2891,10 +2895,6 @@ func (kl *Kubelet) handlePodResourcesResize(pod *v1.Pod, podStatus *kubecontaine
28912895
// Pod allocation does not need to be updated.
28922896
return allocatedPod, nil
28932897
}
2894-
if goos == "windows" {
2895-
kl.statusManager.SetPodResizeStatus(pod.UID, v1.PodResizeStatusInfeasible)
2896-
return allocatedPod, nil
2897-
}
28982898

28992899
kl.podResizeMutex.Lock()
29002900
defer kl.podResizeMutex.Unlock()

0 commit comments

Comments
 (0)