diff --git a/stage1/init/pod.go b/stage1/init/pod.go index 965cdc1..8e75a16 100644 --- a/stage1/init/pod.go +++ b/stage1/init/pod.go @@ -254,6 +254,14 @@ func (p *Pod) appToSystemd(ra *schema.RuntimeApp, am *schema.ImageManifest, inte case *types.ResourceMemory: l := v.Limit().String() opts = append(opts, newUnitOption("Service", "MemoryLimit", l)) + case *types.ResourceCPU: + l := v.Limit().String() + milliCores, err := strconv.Atoi(l) + if err != nil { + return err + } + quota := strconv.Itoa(milliCores/10) + "%" + opts = append(opts, newUnitOption("Service", "CPUQuota", quota)) } }