diff --git a/modules/k3s/testcontainers/k3s/__init__.py b/modules/k3s/testcontainers/k3s/__init__.py index fbdeefee3..bba58b519 100644 --- a/modules/k3s/testcontainers/k3s/__init__.py +++ b/modules/k3s/testcontainers/k3s/__init__.py @@ -44,7 +44,9 @@ def __init__(self, image="rancher/k3s:latest", enable_cgroup_mount=True, **kwarg self.with_exposed_ports(self.KUBE_SECURE_PORT, self.RANCHER_WEBHOOK_PORT) self.with_env("K3S_URL", f"https://{self.get_container_host_ip()}:{self.KUBE_SECURE_PORT}") self.with_command("server --disable traefik --tls-san=" + self.get_container_host_ip()) - self.with_kwargs(privileged=True, tmpfs={"/run": "", "/var/run": ""}) + self.with_kwargs(privileged=True) + self.with_tmpfs_mount("/run") + self.with_tmpfs_mount("/var/run") if enable_cgroup_mount: self.with_volume_mapping("/sys/fs/cgroup", "/sys/fs/cgroup", "rw") else: