fix(sure): make /tmp usable for ruby #43
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/sure-tmp-volume"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
/tmp is world-writable,could not find a temporary directory. Kubernetes creates a disk-backedemptyDirwith mode 2777 (no sticky bit) and Ruby'sDir.tmpdirrefuses it. The podman test used a tmpfs, which is sticky, and did not show it.TMPDIRpointing at the upload volume.Changes
sure.volumes:/tmpis a memory-backedemptyDirwithsizeLimitfrom the new valuetmp.sizeLimit(256Mi). A memory-backed one is created 3777.Verification
fsGroup1000: disk-backedemptyDirat/tmpis 2777 andDir.tmpdirraises; with asubPaththe same;medium: Memoryis 3777 andDir.tmpdirreturns/tmp; a directory made by an init container (0700) also works.helm lint --strictonci/default-values.yamlandci/external-values.yaml: 0 failed;helm templaterendersmedium: Memory,sizeLimit: "256Mi".Notes
TMPDIRpointing at it. It works but adds a container to every pod.tmp.sizeLimittogether with the memory limit if imports need more.- a disk-backed emptyDir is created 2777 without the sticky bit, and Ruby's Dir.tmpdir refuses it, so the web pod crash-looped at start ("could not find a temporary directory") - mount /tmp as a memory-backed emptyDir, which is created 3777 - new value tmp.sizeLimit (256Mi): the use counts against the memory limit, so cap it - chart version 0.2.1