From 86efc8bd79c75d171bc448239002f4c746addf32 Mon Sep 17 00:00:00 2001 From: vinay kulkarni Date: Tue, 14 Mar 2023 20:30:02 +0000 Subject: [PATCH] Add isInPlacePodVerticalScalingAllowed for restart check block --- pkg/kubelet/kuberuntime/kuberuntime_manager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kubelet/kuberuntime/kuberuntime_manager.go b/pkg/kubelet/kuberuntime/kuberuntime_manager.go index 5721b9c9ede..43f3804a832 100644 --- a/pkg/kubelet/kuberuntime/kuberuntime_manager.go +++ b/pkg/kubelet/kuberuntime/kuberuntime_manager.go @@ -946,7 +946,7 @@ func (m *kubeGenericRuntimeManager) computePodActions(ctx context.Context, pod * restart := shouldRestartOnFailure(pod) // Do not restart if only the Resources field has changed with InPlacePodVerticalScaling enabled if _, _, changed := containerChanged(&container, containerStatus); changed && - (!utilfeature.DefaultFeatureGate.Enabled(features.InPlacePodVerticalScaling) || + (!isInPlacePodVerticalScalingAllowed(pod) || kubecontainer.HashContainerWithoutResources(&container) != containerStatus.HashWithoutResources) { message = fmt.Sprintf("Container %s definition changed", container.Name) // Restart regardless of the restart policy because the container