Custom cgroup_parent

Check that the parent cgroup matches the intended resource limits and operational policy.

Description

cgroup_parent places a container under a specific parent cgroup. Check that the parent’s policies match the CPU and memory controls the service needs.

Potential impact

A service placed under the wrong parent can compete with other workloads for resources and make it harder to trace resource use.

Remediation

Remove cgroup_parent if the service can use the runtime default. If it needs a custom parent, verify its limits and record the policy in the shared deployment template.

Examples

Before

yaml
services:
  app:
    image: nginx:latest
    cgroup_parent: custom-parent

After

yaml
services:
  app:
    image: nginx:latest

Removing custom-parent restores default placement. Set CPU or memory limits separately if the service needs them.

References