diff --git a/pkg/kubelet/kuberuntime/kuberuntime_container.go b/pkg/kubelet/kuberuntime/kuberuntime_container.go index ebda5f340a4..48147f97ff2 100644 --- a/pkg/kubelet/kuberuntime/kuberuntime_container.go +++ b/pkg/kubelet/kuberuntime/kuberuntime_container.go @@ -440,7 +440,7 @@ func (m *kubeGenericRuntimeManager) updatePodSandboxResources(ctx context.Contex // an error with code 'Unimplemented'. // This is being fixed in https://github.com/containerd/containerd/pull/13023, so this hardcoded // string check can be removed once containerd 2.2 is no longer supported. - unimplementedMsg := "not implemented" + const unimplementedMsg = "not implemented" if stat.Code() == codes.Unimplemented || (stat.Code() == codes.Unknown && strings.Contains(stat.Message(), unimplementedMsg)) { logger.V(3).Info("updatePodSandboxResources failed: unimplemented; this call is best-effort: proceeding with resize", "sandboxID", sandboxID) return nil