Enable pod qos for systemd in cri

Check kubelet config with docker config
This commit is contained in:
Harry Zhang
2016-12-08 16:59:41 +08:00
parent db867c0c9d
commit b36c5cbbec
6 changed files with 54 additions and 8 deletions

View File

@@ -149,9 +149,11 @@ func (ds *dockerService) CreateContainer(podSandboxID string, config *runtimeapi
// Apply cgroupsParent derived from the sandbox config.
if lc := sandboxConfig.GetLinux(); lc != nil {
// Apply Cgroup options.
// TODO: Check if this works with per-pod cgroups.
// TODO: we need to pass the cgroup in syntax expected by cgroup driver but shim does not use docker info yet...
hc.CgroupParent = lc.GetCgroupParent()
cgroupParent, err := ds.GenerateExpectedCgroupParent(lc.GetCgroupParent())
if err != nil {
return "", fmt.Errorf("failed to generate cgroup parent in expected syntax for container %q: %v", config.Metadata.GetName(), err)
}
hc.CgroupParent = cgroupParent
}
// Set devices for container.