Closed
Description
Problem:
Given:
- Running
coder
on Kubernetes coder.securityContext.readOnlyRootFileSystem=true
is set in Helm valuescoder.env
contains{ "name": "CODER_CACHE_DIRECTORY", "value": "/path/to/tmpfs" }
coder.volumes
specifies a writable volume not under/tmp
If you try running coder
on Kubernetes with and set CODER_CACHE_DIRECTORY
to /cache
, pods will still fail with an error similar to:
create provisioner daemon: mkdir /tmp/provisionerdXXXXXXXXXXX: read-only file system
It appears that the built-in provisionerd server just writes to /tmp
and this is non-configurable.
My expectation would be that the built-in provisionerd servers would honour CODER_CACHE_DIRECTORY
.
Workaround:
Mount a writable volume on /tmp
e.g.
coder:
volumes:
- name: "tmp"
emptyDir: {}
volumeMounts:
- name: "tmp"
mountPath "/tmp"
readOnly: false