Kubernetes - setting custom permissions/file ownership per volume (and not per pod)
One solution is to use init-container to change permissions of mounted directories.
The init-container would need to mount both volumes (from both containers), and do the needed chown
/chmod
operations.
Drawbacks:
- extra container that needs to be aware of other containers' specific (ie. uid/gid)
- init container needs to run as root to perform
chown