mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
Move windows infeasible resize check into canResizePod
This commit is contained in:
parent
591c75e40b
commit
61e6242967
@ -2830,6 +2830,10 @@ func isPodResizeInProgress(pod *v1.Pod, podStatus *kubecontainer.PodStatus) bool
|
|||||||
// pod should hold the desired (pre-allocated) spec.
|
// pod should hold the desired (pre-allocated) spec.
|
||||||
// Returns true if the resize can proceed.
|
// Returns true if the resize can proceed.
|
||||||
func (kl *Kubelet) canResizePod(pod *v1.Pod) (bool, v1.PodResizeStatus) {
|
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 v1qos.GetPodQOS(pod) == v1.PodQOSGuaranteed && !utilfeature.DefaultFeatureGate.Enabled(features.InPlacePodVerticalScalingExclusiveCPUs) {
|
||||||
if utilfeature.DefaultFeatureGate.Enabled(features.CPUManager) {
|
if utilfeature.DefaultFeatureGate.Enabled(features.CPUManager) {
|
||||||
if kl.containerManager.GetNodeConfig().CPUManagerPolicy == "static" {
|
if kl.containerManager.GetNodeConfig().CPUManagerPolicy == "static" {
|
||||||
@ -2891,10 +2895,6 @@ func (kl *Kubelet) handlePodResourcesResize(pod *v1.Pod, podStatus *kubecontaine
|
|||||||
// Pod allocation does not need to be updated.
|
// Pod allocation does not need to be updated.
|
||||||
return allocatedPod, nil
|
return allocatedPod, nil
|
||||||
}
|
}
|
||||||
if goos == "windows" {
|
|
||||||
kl.statusManager.SetPodResizeStatus(pod.UID, v1.PodResizeStatusInfeasible)
|
|
||||||
return allocatedPod, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
kl.podResizeMutex.Lock()
|
kl.podResizeMutex.Lock()
|
||||||
defer kl.podResizeMutex.Unlock()
|
defer kl.podResizeMutex.Unlock()
|
||||||
|
Loading…
Reference in New Issue
Block a user