mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 21:47:07 +00:00
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.
This commit is contained in:
commit
bc650d7ec7
@ -470,6 +470,16 @@ func (ds *dockerService) makeSandboxDockerConfig(c *runtimeapi.PodSandboxConfig,
|
|||||||
// Apply resource options.
|
// Apply resource options.
|
||||||
setSandboxResources(hc)
|
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.
|
// Set security options.
|
||||||
securityOpts, err := getSandboxSecurityOpts(c, ds.seccompProfileRoot, securityOptSep)
|
securityOpts, err := getSandboxSecurityOpts(c, ds.seccompProfileRoot, securityOptSep)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user