mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
dockershim puts pause container in pod cgroup
This commit is contained in:
parent
6edd079024
commit
0449b008a8
@ -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