fix #73264 cpuPeriod was not reset, but used as it is if alpha gate is disabled
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
This commit is contained in:
@@ -18,11 +18,6 @@ limitations under the License.
|
||||
|
||||
package kuberuntime
|
||||
|
||||
import (
|
||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||
kubefeatures "k8s.io/kubernetes/pkg/features"
|
||||
)
|
||||
|
||||
const (
|
||||
// Taken from lmctfy https://github.com/google/lmctfy/blob/master/lmctfy/controllers/cpu_controller.cc
|
||||
minShares = 2
|
||||
@@ -59,9 +54,6 @@ func milliCPUToQuota(milliCPU int64, period int64) (quota int64) {
|
||||
if milliCPU == 0 {
|
||||
return
|
||||
}
|
||||
if !utilfeature.DefaultFeatureGate.Enabled(kubefeatures.CPUCFSQuotaPeriod) {
|
||||
period = quotaPeriod
|
||||
}
|
||||
|
||||
// we then convert your milliCPU to a value normalized over a period
|
||||
quota = (milliCPU * period) / milliCPUToCPU
|
||||
|
Reference in New Issue
Block a user