summaryrefslogtreecommitdiff
path: root/pkg/specgen
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-09-30 13:34:52 -0400
committerGitHub <noreply@github.com>2021-09-30 13:34:52 -0400
commit16b9b51ae16bd73932053328363ae0da281b8a19 (patch)
treeb10db2a627a8e5d28a52bc8a747b5febebd9fa7d /pkg/specgen
parent3d08c4088fd397006241ff9c7177117a0b2269d6 (diff)
parent9c6c981928c3e020ff6eef9454c7ee86aa8c83d1 (diff)
downloadpodman-16b9b51ae16bd73932053328363ae0da281b8a19.tar.gz
podman-16b9b51ae16bd73932053328363ae0da281b8a19.tar.bz2
podman-16b9b51ae16bd73932053328363ae0da281b8a19.zip
Merge pull request #11806 from giuseppe/play-kube-fix-cpu-limits
kube: fix conversion from milliCPU to period/quota
Diffstat (limited to 'pkg/specgen')
-rw-r--r--pkg/specgen/generate/kube/kube.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/specgen/generate/kube/kube.go b/pkg/specgen/generate/kube/kube.go
index 27a1e5a72..9389b1a20 100644
--- a/pkg/specgen/generate/kube/kube.go
+++ b/pkg/specgen/generate/kube/kube.go
@@ -160,7 +160,7 @@ func ToSpecGen(ctx context.Context, opts *CtrSpecGenOptions) (*specgen.SpecGener
return nil, errors.Wrap(err, "Failed to set CPU quota")
}
if milliCPU > 0 {
- period, quota := util.CoresToPeriodAndQuota(float64(milliCPU) / 1000)
+ period, quota := util.CoresToPeriodAndQuota(float64(milliCPU))
s.ResourceLimits.CPU = &spec.LinuxCPU{
Quota: &quota,
Period: &period,