summaryrefslogtreecommitdiff
path: root/libpod/kube.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-11-02 16:02:55 +0100
committerGitHub <noreply@github.com>2020-11-02 16:02:55 +0100
commit7375a55757fe7615f133db5b097bb4db9a244888 (patch)
tree6d29d221f696c3aabfa1e847d92f55da41cb27e9 /libpod/kube.go
parent8bc0f51e330185bed1be4bcfffd04729b4bc9cd4 (diff)
parent03579649063d669f9f57d534f74136befef98c62 (diff)
downloadpodman-7375a55757fe7615f133db5b097bb4db9a244888.tar.gz
podman-7375a55757fe7615f133db5b097bb4db9a244888.tar.bz2
podman-7375a55757fe7615f133db5b097bb4db9a244888.zip
Merge pull request #8207 from xordspar0/common-period-quota
Centralize cores and period/quota conversion code
Diffstat (limited to 'libpod/kube.go')
-rw-r--r--libpod/kube.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/kube.go b/libpod/kube.go
index cd5064c84..067e7827d 100644
--- a/libpod/kube.go
+++ b/libpod/kube.go
@@ -327,7 +327,7 @@ func containerToV1Container(c *Container) (v1.Container, []v1.Volume, error) {
period := *c.config.Spec.Linux.Resources.CPU.Period
if quota > 0 && period > 0 {
- cpuLimitMilli := int64(1000 * float64(quota) / float64(period))
+ cpuLimitMilli := int64(1000 * util.PeriodAndQuotaToCores(period, quota))
// Kubernetes: precision finer than 1m is not allowed
if cpuLimitMilli >= 1 {