Skip to content

[FEATURE] Ability to change cgroupdriver to systemd #293

@MurzNN

Description

@MurzNN

Is your feature request related to a problem?

When we install kubernetes, it recommends the systemd driver for Docker:

[preflight] Running pre-flight checks
        [WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/

So I try to set it via creating file:

cat > /etc/docker/daemon.json <<EOF
{
  "exec-opts": ["native.cgroupdriver=systemd"],
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "100m"
  },
  "storage-driver": "overlay2"
}
EOF

But formula removes it on every state apply.
Other way is to change systemd docker service via setting

ExecStart=/usr/bin/dockerd --exec-opt native.cgroupdriver=systemd

Describe the solution you'd like

Will be good to have this setting in Docker formula.

Describe alternatives you've considered

Alternative is not deleting the /etc/docker/daemon.json file, but separate setting in formula will be much better.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions