mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 23:37:01 +00:00
Fix linter errors
This commit is contained in:
parent
bf8354d460
commit
1d822f1dc8
@ -672,7 +672,7 @@ func (m *kubeGenericRuntimeManager) doPodResizeAction(pod *v1.Pod, podStatus *ku
|
||||
podResources := cm.ResourceConfigForPod(pod, m.cpuCFSQuota, uint64((m.cpuCFSQuotaPeriod.Duration)/time.Microsecond), false)
|
||||
if podResources == nil {
|
||||
klog.ErrorS(nil, "Unable to get resource configuration", "pod", pod.Name)
|
||||
result.Fail(fmt.Errorf("Unable to get resource configuration processing resize for pod %s", pod.Name))
|
||||
result.Fail(fmt.Errorf("unable to get resource configuration processing resize for pod %s", pod.Name))
|
||||
return
|
||||
}
|
||||
setPodCgroupConfig := func(rName v1.ResourceName, setLimitValue bool) error {
|
||||
@ -751,7 +751,7 @@ func (m *kubeGenericRuntimeManager) doPodResizeAction(pod *v1.Pod, podStatus *ku
|
||||
}
|
||||
if currentPodMemoryUsage >= uint64(*podResources.Memory) {
|
||||
klog.ErrorS(nil, "Aborting attempt to set pod memory limit less than current memory usage", "pod", pod.Name)
|
||||
result.Fail(fmt.Errorf("Aborting attempt to set pod memory limit less than current memory usage for pod %s", pod.Name))
|
||||
result.Fail(fmt.Errorf("aborting attempt to set pod memory limit less than current memory usage for pod %s", pod.Name))
|
||||
return
|
||||
}
|
||||
if errResize := resizeContainers(v1.ResourceMemory, int64(*currentPodMemoryConfig.Memory), *podResources.Memory, 0, 0); errResize != nil {
|
||||
|
@ -2685,7 +2685,7 @@ func TestUpdatePodContainerResources(t *testing.T) {
|
||||
}
|
||||
fakeRuntime.Called = []string{}
|
||||
err := m.updatePodContainerResources(pod, tc.resourceName, containersToUpdate)
|
||||
assert.NoError(t, err, dsc)
|
||||
require.NoError(t, err, dsc)
|
||||
|
||||
if tc.invokeUpdateResources {
|
||||
assert.Contains(t, fakeRuntime.Called, "UpdateContainerResources", dsc)
|
||||
|
Loading…
Reference in New Issue
Block a user