Skip to content

Commit bd99642

Browse files
committed
adjust tmpfs
Signed-off-by: Kimmo Lehto <[email protected]>
1 parent dfd4ef9 commit bd99642

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

pkg/cluster/cluster.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,8 @@ func (c *Cluster) createMachineRunArgs(machine *Machine, name string, i int) []s
306306
"--label", "io.k0sproject.bootloose.cluster=" + c.spec.Cluster.Name,
307307
"--name", name,
308308
"--hostname", machine.Hostname(),
309-
"--tmpfs", "/run",
310-
"--tmpfs", "/run/lock",
309+
"--tmpfs", "/run:rw,size=100m,mode=755",
310+
"--tmpfs", "/run/lock:rw,size=100m,mode=755",
311311
"--tmpfs", "/tmp:exec,mode=777",
312312
}
313313
if docker.CgroupVersion() == "2" {
@@ -363,7 +363,7 @@ func (c *Cluster) createMachineRunArgs(machine *Machine, name string, i int) []s
363363
)
364364
}
365365
} else {
366-
runArgs = append(runArgs, "-v", "/sys/fs/cgroup:/sys/fs/cgroup:ro")
366+
runArgs = append(runArgs, "-v", "/sys/fs/cgroup:/sys/fs/cgroup:ro", "--privileged")
367367
}
368368

369369
for _, volume := range machine.spec.Volumes {
@@ -393,10 +393,6 @@ func (c *Cluster) createMachineRunArgs(machine *Machine, name string, i int) []s
393393
runArgs = append(runArgs, "-p", publish)
394394
}
395395

396-
// if machine.spec.Privileged {
397-
runArgs = append(runArgs, "--privileged")
398-
// }
399-
400396
if len(machine.spec.Networks) > 0 {
401397
network := machine.spec.Networks[0]
402398
log.Infof("Connecting %s to the %s network...", name, network)

0 commit comments

Comments
 (0)