mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 16:29:21 +00:00
Merge pull request #87712 from alena1108/jan30kubelet
Ineffassign fixes for pkg/controller and kubelet
This commit is contained in:
commit
1a0f923a65
@ -937,7 +937,6 @@ func convertDesiredReplicasWithRules(currentReplicas, desiredReplicas, hpaMinRep
|
|||||||
var possibleLimitingReason string
|
var possibleLimitingReason string
|
||||||
|
|
||||||
minimumAllowedReplicas = hpaMinReplicas
|
minimumAllowedReplicas = hpaMinReplicas
|
||||||
possibleLimitingReason = "the desired replica count is less than the minimum replica count"
|
|
||||||
|
|
||||||
// Do not upscale too much to prevent incorrect rapid increase of the number of master replicas caused by
|
// Do not upscale too much to prevent incorrect rapid increase of the number of master replicas caused by
|
||||||
// bogus CPU usage report from heapster/kubelet (like in issue #32304).
|
// bogus CPU usage report from heapster/kubelet (like in issue #32304).
|
||||||
@ -945,7 +944,6 @@ func convertDesiredReplicasWithRules(currentReplicas, desiredReplicas, hpaMinRep
|
|||||||
|
|
||||||
if hpaMaxReplicas > scaleUpLimit {
|
if hpaMaxReplicas > scaleUpLimit {
|
||||||
maximumAllowedReplicas = scaleUpLimit
|
maximumAllowedReplicas = scaleUpLimit
|
||||||
|
|
||||||
possibleLimitingCondition = "ScaleUpLimit"
|
possibleLimitingCondition = "ScaleUpLimit"
|
||||||
possibleLimitingReason = "the desired replica count is increasing faster than the maximum scale rate"
|
possibleLimitingReason = "the desired replica count is increasing faster than the maximum scale rate"
|
||||||
} else {
|
} else {
|
||||||
|
@ -76,7 +76,6 @@ func (cm *containerManagerImpl) Start(node *v1.Node,
|
|||||||
|
|
||||||
// NewContainerManager creates windows container manager.
|
// NewContainerManager creates windows container manager.
|
||||||
func NewContainerManager(mountUtil mount.Interface, cadvisorInterface cadvisor.Interface, nodeConfig NodeConfig, failSwapOn bool, devicePluginEnabled bool, recorder record.EventRecorder) (ContainerManager, error) {
|
func NewContainerManager(mountUtil mount.Interface, cadvisorInterface cadvisor.Interface, nodeConfig NodeConfig, failSwapOn bool, devicePluginEnabled bool, recorder record.EventRecorder) (ContainerManager, error) {
|
||||||
var capacity = v1.ResourceList{}
|
|
||||||
// It is safe to invoke `MachineInfo` on cAdvisor before logically initializing cAdvisor here because
|
// It is safe to invoke `MachineInfo` on cAdvisor before logically initializing cAdvisor here because
|
||||||
// machine info is computed and cached once as part of cAdvisor object creation.
|
// machine info is computed and cached once as part of cAdvisor object creation.
|
||||||
// But `RootFsInfo` and `ImagesFsInfo` are not available at this moment so they will be called later during manager starts
|
// But `RootFsInfo` and `ImagesFsInfo` are not available at this moment so they will be called later during manager starts
|
||||||
@ -84,7 +83,7 @@ func NewContainerManager(mountUtil mount.Interface, cadvisorInterface cadvisor.I
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
capacity = cadvisor.CapacityFromMachineInfo(machineInfo)
|
capacity := cadvisor.CapacityFromMachineInfo(machineInfo)
|
||||||
|
|
||||||
return &containerManagerImpl{
|
return &containerManagerImpl{
|
||||||
capacity: capacity,
|
capacity: capacity,
|
||||||
|
Loading…
Reference in New Issue
Block a user