Commit bc650d7e authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #42055 from derekwaynecarr/sandbox-cgroup-parent

Automatic merge from submit-queue (batch tested with PRs 41962, 42055, 42062, 42019, 42054) dockershim puts pause container in pod cgroup **What this PR does / why we need it**: The CRI was not launching the pause container in the pod level cgroup. The non-CRI code path was.
parents 05f3c715 0449b008
......@@ -470,6 +470,16 @@ func (ds *dockerService) makeSandboxDockerConfig(c *runtimeapi.PodSandboxConfig,
// Apply resource options.
setSandboxResources(hc)
// Apply cgroupsParent derived from the sandbox config.
if lc := c.GetLinux(); lc != nil {
// Apply Cgroup options.
cgroupParent, err := ds.GenerateExpectedCgroupParent(lc.CgroupParent)
if err != nil {
return nil, fmt.Errorf("failed to generate cgroup parent in expected syntax for container %q: %v", c.Metadata.Name, err)
}
hc.CgroupParent = cgroupParent
}
// Set security options.
securityOpts, err := getSandboxSecurityOpts(c, ds.seccompProfileRoot, securityOptSep)
if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment