So, let's see if #hachyderm or the further #Federation can give me a hand with some #kubernetes (#k8s).
I've got 2 containers running on the same pod. One of them (nginx) run as root and the other (app) doesn't. I'm trying to have a shared volume between the 2 using an emptyDir, but when I try to copy files on initContainer using the non-root img, I get an error telling me "Operation not permitted" when trying to chgrp the volume. Can I change the ownership of the volume? securityContext? #help
Conversation
Notices
-
Embed this notice
Julio J. 🀲 (j3j5@hachyderm.io)'s status on Wednesday, 07-Dec-2022 12:31:48 JST Julio J. 🀲
- Kris Nóva repeated this.
-
Embed this notice
Julio J. 🀲 (j3j5@hachyderm.io)'s status on Wednesday, 07-Dec-2022 12:31:49 JST Julio J. 🀲
OK, just for the record, I've found *a solution*. I don't like it and it does feel hacky, although otoh it doesn't feel too wrong.
Add an extra initContainer with busybox and chown the shared volume with the desired uid and gid. It's ugly but it works. If nobody throws a big reason why I shouldn't be doing this, I'm going to leave it like this.
Thanks for the boosts #hachyderm !