Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom (Docker) bind mounts for Talos-in-Docker clusters #9607

Closed
Tracked by #9249
PhilipSchmid opened this issue Oct 31, 2024 · 0 comments · Fixed by #9639
Closed
Tracked by #9249

Support custom (Docker) bind mounts for Talos-in-Docker clusters #9607

PhilipSchmid opened this issue Oct 31, 2024 · 0 comments · Fixed by #9639
Assignees

Comments

@PhilipSchmid
Copy link

Feature Request

Allow specifying custom (Docker) volume (bind) mounts when starting a Talos-in-Docker cluster using talosctl cluster create.

Description / Background

Knowing which kernel modules are present in the underlying host's kernel is essential for some (primarily infra-related) workloads like Cilium.

For example, having direct access via a bind mount to the host's /lib/modules is required for proper kernel module validation. Because of that, we're "bind" mounting /lib/modules:/lib/modules in Cilium's KIND-based testing setup. This also applies to the provided devcontainer setup and even for the Cilium agent DaemonSet from the official Helm chart.

Difficulty: The actually used kernel version (uname -r) doesn't match what's available within /lib/modules/:

root@talos-default-controlplane-1:/home/cilium# uname -r
6.10.4-linuxkit
root@talos-default-controlplane-1:/home/cilium# ls -l /lib/modules/
total 4
drwxr-xr-x 3 root root 4096 Sep 23 13:23 6.6.52-talos

No, unfortunately, Running Talos in Docker Manually with a manually added --mount source=/lib/modules,target=/lib/modules,type=bind,readonly isn't really a feasible alternative, as some talosctl parameters set up specific Talos internal things (--config-patch-control-plane, --cidr, --kubernetes-version, etc.) which can't be done via simple docker run ... ghcr.io/siderolabs/talos.

@smira smira self-assigned this Nov 5, 2024
smira added a commit to smira/talos that referenced this issue Nov 13, 2024
Fixes siderolabs#9607

Use docker CLI syntax, support any kind of mounts supported by docker
CLI.

Also drop modules from `talos` container image, as it's useless to
provide modules in container mode.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit 05c6209)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants