feat: Switch profiles to cgroup v2 and drop raw.lxc from docker profiles
- Use lxc.cgroup2.devices.allow instead of the cgroup v1 key, ignored on cgroup v2 hosts (Ubuntu >= 21.10) - Remove raw.lxc (unconfined apparmor, all devices, no cap drop) from docker, dokploy and coolify: privileged + nesting is enough, tested with build, published ports, privileged containers, limits and restart - Add docker-unprivileged profile (nesting + mknod/setxattr syscall interception) for new containers - Sync microk8s with the deployed version (device numbering) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018inUJksoKAfKRWoSo1tvv6
This commit is contained in:
1 parent
f99bd9e65a
commit
f37c01df57
6 files changed
+49
-46
No files matched your search
@@ -1,35 +1,6 @@
|
||||
name: microk8s
|
||||
description: "A profile that deploy microk8s in an LXD container"
|
||||
devices:
|
||||
aadisable:
|
||||
path: /sys/module/nf_conntrack/parameters/hashsize
|
||||
source: /sys/module/nf_conntrack/parameters/hashsize
|
||||
type: disk
|
||||
aadisable2:
|
||||
path: /dev/zfs
|
||||
source: /dev/zfs
|
||||
type: disk
|
||||
aadisable3:
|
||||
path: /dev/kmsg
|
||||
source: /dev/kmsg
|
||||
type: unix-char
|
||||
aadisable4:
|
||||
path: /sys/fs/bpf
|
||||
source: /sys/fs/bpf
|
||||
type: disk
|
||||
aadisable5:
|
||||
path: /proc/sys/net/netfilter/nf_conntrack_max
|
||||
source: /proc/sys/net/netfilter/nf_conntrack_max
|
||||
type: disk
|
||||
description: A profile that deploy microk8s in an LXD container
|
||||
config:
|
||||
linux.kernel_modules: ip_vs,ip_vs_rr,ip_vs_wrr,ip_vs_sh,ip_tables,ip6_tables,netlink_diag,nf_nat,overlay,br_netfilter
|
||||
raw.lxc: |
|
||||
lxc.apparmor.profile=unconfined
|
||||
lxc.mount.auto=proc:rw sys:rw cgroup:rw
|
||||
lxc.cgroup.devices.allow=a
|
||||
lxc.cap.drop=
|
||||
security.nesting: "true"
|
||||
security.privileged: "true"
|
||||
cloud-init.vendor-data: |
|
||||
#cloud-config
|
||||
package_update: true
|
||||
@@ -38,3 +9,32 @@ config:
|
||||
- [ 'snap', 'install', 'microk8s', '--classic' ]
|
||||
timezone: Europe/Paris
|
||||
locale: fr_FR.UTF-8
|
||||
linux.kernel_modules: ip_vs,ip_vs_rr,ip_vs_wrr,ip_vs_sh,ip_tables,ip6_tables,netlink_diag,nf_nat,overlay,br_netfilter
|
||||
raw.lxc: |
|
||||
lxc.apparmor.profile=unconfined
|
||||
lxc.mount.auto=proc:rw sys:rw cgroup:rw
|
||||
lxc.cgroup2.devices.allow=a
|
||||
lxc.cap.drop=
|
||||
security.nesting: "true"
|
||||
security.privileged: "true"
|
||||
devices:
|
||||
aadisable:
|
||||
path: /sys/module/nf_conntrack/parameters/hashsize
|
||||
source: /sys/module/nf_conntrack/parameters/hashsize
|
||||
type: disk
|
||||
aadisable2:
|
||||
path: /dev/kmsg
|
||||
source: /dev/kmsg
|
||||
type: unix-char
|
||||
aadisable3:
|
||||
path: /sys/fs/bpf
|
||||
source: /sys/fs/bpf
|
||||
type: disk
|
||||
aadisable4:
|
||||
path: /proc/sys/net/netfilter/nf_conntrack_max
|
||||
source: /proc/sys/net/netfilter/nf_conntrack_max
|
||||
type: disk
|
||||
aadisable5:
|
||||
path: /dev/zfs
|
||||
source: /dev/zfs
|
||||
type: disk
|
||||
Reference in new issue
Block a user