aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2021-09-30 15:22:47 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2021-09-30 16:08:43 +0200
commit9c6c981928c3e020ff6eef9454c7ee86aa8c83d1 (patch)
tree9898a250af2a93ec4451028a31d1117edfe5d320 /pkg
parent39d27cc6cc065aea4ab12b646906a8ea06e30de9 (diff)
downloadpodman-9c6c981928c3e020ff6eef9454c7ee86aa8c83d1.tar.gz
podman-9c6c981928c3e020ff6eef9454c7ee86aa8c83d1.tar.bz2
podman-9c6c981928c3e020ff6eef9454c7ee86aa8c83d1.zip
kube: fix conversion from milliCPU to period/quota
Closes: https://github.com/containers/podman/issues/11803 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg')
-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 c01d7a1f0..2dd0f5647 100644
--- a/pkg/specgen/generate/kube/kube.go
+++ b/pkg/specgen/generate/kube/kube.go
@@ -157,7 +157,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,