Browse Source
[containerd] Simplify limiting number of open files per container (#9319)
[containerd] Simplify limiting number of open files per container (#9319)
by setting a default runtime spec with a patch for RLIMIT_NOFILE. - Introduces containerd_base_runtime_spec_rlimit_nofile. - Generates base_runtime_spec on-the-fly, to use the containerd version of the node.pull/9471/head
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 224 deletions
Unified View
Diff Options
-
19docs/containerd.md
-
13roles/container-engine/containerd/defaults/main.yml
-
214roles/container-engine/containerd/files/cri-base.json
-
10roles/container-engine/containerd/tasks/main.yml
@ -1,214 +0,0 @@ |
|||||
{ |
|
||||
"ociVersion": "1.0.2-dev", |
|
||||
"process": { |
|
||||
"user": { |
|
||||
"uid": 0, |
|
||||
"gid": 0 |
|
||||
}, |
|
||||
"cwd": "/", |
|
||||
"capabilities": { |
|
||||
"bounding": [ |
|
||||
"CAP_CHOWN", |
|
||||
"CAP_DAC_OVERRIDE", |
|
||||
"CAP_FSETID", |
|
||||
"CAP_FOWNER", |
|
||||
"CAP_MKNOD", |
|
||||
"CAP_NET_RAW", |
|
||||
"CAP_SETGID", |
|
||||
"CAP_SETUID", |
|
||||
"CAP_SETFCAP", |
|
||||
"CAP_SETPCAP", |
|
||||
"CAP_NET_BIND_SERVICE", |
|
||||
"CAP_SYS_CHROOT", |
|
||||
"CAP_KILL", |
|
||||
"CAP_AUDIT_WRITE" |
|
||||
], |
|
||||
"effective": [ |
|
||||
"CAP_CHOWN", |
|
||||
"CAP_DAC_OVERRIDE", |
|
||||
"CAP_FSETID", |
|
||||
"CAP_FOWNER", |
|
||||
"CAP_MKNOD", |
|
||||
"CAP_NET_RAW", |
|
||||
"CAP_SETGID", |
|
||||
"CAP_SETUID", |
|
||||
"CAP_SETFCAP", |
|
||||
"CAP_SETPCAP", |
|
||||
"CAP_NET_BIND_SERVICE", |
|
||||
"CAP_SYS_CHROOT", |
|
||||
"CAP_KILL", |
|
||||
"CAP_AUDIT_WRITE" |
|
||||
], |
|
||||
"inheritable": [ |
|
||||
"CAP_CHOWN", |
|
||||
"CAP_DAC_OVERRIDE", |
|
||||
"CAP_FSETID", |
|
||||
"CAP_FOWNER", |
|
||||
"CAP_MKNOD", |
|
||||
"CAP_NET_RAW", |
|
||||
"CAP_SETGID", |
|
||||
"CAP_SETUID", |
|
||||
"CAP_SETFCAP", |
|
||||
"CAP_SETPCAP", |
|
||||
"CAP_NET_BIND_SERVICE", |
|
||||
"CAP_SYS_CHROOT", |
|
||||
"CAP_KILL", |
|
||||
"CAP_AUDIT_WRITE" |
|
||||
], |
|
||||
"permitted": [ |
|
||||
"CAP_CHOWN", |
|
||||
"CAP_DAC_OVERRIDE", |
|
||||
"CAP_FSETID", |
|
||||
"CAP_FOWNER", |
|
||||
"CAP_MKNOD", |
|
||||
"CAP_NET_RAW", |
|
||||
"CAP_SETGID", |
|
||||
"CAP_SETUID", |
|
||||
"CAP_SETFCAP", |
|
||||
"CAP_SETPCAP", |
|
||||
"CAP_NET_BIND_SERVICE", |
|
||||
"CAP_SYS_CHROOT", |
|
||||
"CAP_KILL", |
|
||||
"CAP_AUDIT_WRITE" |
|
||||
] |
|
||||
}, |
|
||||
"rlimits": [ |
|
||||
{ |
|
||||
"type": "RLIMIT_NOFILE", |
|
||||
"hard": 1024, |
|
||||
"soft": 1024 |
|
||||
} |
|
||||
], |
|
||||
"noNewPrivileges": true |
|
||||
}, |
|
||||
"root": { |
|
||||
"path": "rootfs" |
|
||||
}, |
|
||||
"mounts": [ |
|
||||
{ |
|
||||
"destination": "/proc", |
|
||||
"type": "proc", |
|
||||
"source": "proc", |
|
||||
"options": [ |
|
||||
"nosuid", |
|
||||
"noexec", |
|
||||
"nodev" |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"destination": "/dev", |
|
||||
"type": "tmpfs", |
|
||||
"source": "tmpfs", |
|
||||
"options": [ |
|
||||
"nosuid", |
|
||||
"strictatime", |
|
||||
"mode=755", |
|
||||
"size=65536k" |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"destination": "/dev/pts", |
|
||||
"type": "devpts", |
|
||||
"source": "devpts", |
|
||||
"options": [ |
|
||||
"nosuid", |
|
||||
"noexec", |
|
||||
"newinstance", |
|
||||
"ptmxmode=0666", |
|
||||
"mode=0620", |
|
||||
"gid=5" |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"destination": "/dev/shm", |
|
||||
"type": "tmpfs", |
|
||||
"source": "shm", |
|
||||
"options": [ |
|
||||
"nosuid", |
|
||||
"noexec", |
|
||||
"nodev", |
|
||||
"mode=1777", |
|
||||
"size=65536k" |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"destination": "/dev/mqueue", |
|
||||
"type": "mqueue", |
|
||||
"source": "mqueue", |
|
||||
"options": [ |
|
||||
"nosuid", |
|
||||
"noexec", |
|
||||
"nodev" |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"destination": "/sys", |
|
||||
"type": "sysfs", |
|
||||
"source": "sysfs", |
|
||||
"options": [ |
|
||||
"nosuid", |
|
||||
"noexec", |
|
||||
"nodev", |
|
||||
"ro" |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
"destination": "/run", |
|
||||
"type": "tmpfs", |
|
||||
"source": "tmpfs", |
|
||||
"options": [ |
|
||||
"nosuid", |
|
||||
"strictatime", |
|
||||
"mode=755", |
|
||||
"size=65536k" |
|
||||
] |
|
||||
} |
|
||||
], |
|
||||
"linux": { |
|
||||
"resources": { |
|
||||
"devices": [ |
|
||||
{ |
|
||||
"allow": false, |
|
||||
"access": "rwm" |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
"cgroupsPath": "/default", |
|
||||
"namespaces": [ |
|
||||
{ |
|
||||
"type": "pid" |
|
||||
}, |
|
||||
{ |
|
||||
"type": "ipc" |
|
||||
}, |
|
||||
{ |
|
||||
"type": "uts" |
|
||||
}, |
|
||||
{ |
|
||||
"type": "mount" |
|
||||
}, |
|
||||
{ |
|
||||
"type": "network" |
|
||||
} |
|
||||
], |
|
||||
"maskedPaths": [ |
|
||||
"/proc/acpi", |
|
||||
"/proc/asound", |
|
||||
"/proc/kcore", |
|
||||
"/proc/keys", |
|
||||
"/proc/latency_stats", |
|
||||
"/proc/timer_list", |
|
||||
"/proc/timer_stats", |
|
||||
"/proc/sched_debug", |
|
||||
"/sys/firmware", |
|
||||
"/proc/scsi" |
|
||||
], |
|
||||
"readonlyPaths": [ |
|
||||
"/proc/bus", |
|
||||
"/proc/fs", |
|
||||
"/proc/irq", |
|
||||
"/proc/sys", |
|
||||
"/proc/sysrq-trigger" |
|
||||
] |
|
||||
} |
|
||||
} |
|
Write
Preview
Loading…
Cancel
Save