-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mattermost-team-edition] Respect custom securityContext #315
Comments
Is this already solved? |
No, it's not officially fixed, yet. However, if you need help setting up a workaround, by using a custom image, then I can help you with that. 🙂 |
Yeah I'm very interested in your workaround! So you set up your security context while building the image I suppose? |
@theAkito Do you have time to share this with me? |
I'm truly sorry for answering so late. At first I forgot about this, then I didn't have enough time. 😞 If you still need help, you could for example send me a message at Once I understand your use case, I will probably just create a Github Gist with the solution for your setup.
Most likely, does not matter. My solution is based on the Docker image itself, so it's irrelevant in what way the Helm Chart or Mattermost is deployed, as long as it is based on the same type of Docker image, the Mattermost Helm Chart is using. |
Thanks for answering. I was hoping you've had a solution that doesn't need to edit the Docker image because of lifecycle purposes. I came across a way to add the securityContext via the Mattermost manifest file, but unfortunately I've never accomplished this. Looking something like this: apiVersion: installation.mattermost.com/v1beta1
kind: Mattermost
spec:
# ...
resourcePatch:
deployment:
patch: '[{"op":"add","path":"/spec/template/spec/initContainers/0/securityContext","value":{"runAsUser": 1337}}]' Nevertheless the priority to fix this decreased since PSP is deprecated and possibly we're going to use Policy Agent instead of PSP. In the meantime we're running containers as root. BUT, if you've a working example like something above; I'm all ears! |
Yes, that's the problem. The problem is, that the user is hard-coded into the image, so to be able to actually run operations as an arbitrary user, you need to change the Dockerfile for that, unfortunately.
Since the At least, that's the case if you truly want the user you select in the |
See the initial issue:
https://forum.mattermost.com/t/permission-error-but-permissions-are-permissive/13080
It's necessary for the Chart setup to respect the provided
securityContext
. If I provide the user and group ID123
and themattermost
process actually runs with those (it actually does, I checked), then the classicmattermost
user with the ID2000
shouldn't remain the user in charge.Related Issues:
#128
#142
The text was updated successfully, but these errors were encountered: