-
Notifications
You must be signed in to change notification settings - Fork 1k
spilo_fsgroup: set to 103 by default #704
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
Conversation
Please, add the default for SpiloFSGroup also in the internal struct. Not sure if I remember the discussion from #531 correctly: Does this work out-of-the-box or is it required to patch the Spilo image? @erthalion |
I have a local |
@FxKu the PR is ready for another review |
rebased |
How I see things, the operator is tightly coupled with the spilo image and if the user does something custom they would have to override the default gid as well. Most likely their custom spilo image would be a fork from the official spilo project and inherit the gid. The motivation of this change is to make the TLS setup a tiny bit easier. I don't have other scenarios in mind that could also benefit from this change. Although I suspect that any other volume that is mounted in the spilo pod would probably want to be readable from the postgres group. |
Sort of, but tight coupling doesn't mean it's not possible to use some modifications, and how far those modifications are coming is up to an author. I would also mention that this is a pod-level parameter, which means all sidecars will also have it. Overall since all this is only for one feature, changing the default value seems questionable for me. But probably it makes sense to go other way around. I don't see why we can't say in #690 that if we have custom TLS section defined, then also set |
Alright. Thanks for looking into this and replying to my questions. I was hoping that this change would simplify the TLS setup and ultimately remove one if-condition branch in the whole system. But like you said, the security context is applied to the whole pod unfortunately and I don't see another route. #690 already checks to make sure that the FSGroup is being set so I will push that to the TLS configuration documentation instead. |
Thank you.
But actually I've meant that we can set |
Okay |
Setting the FSGroup to match the postgres GID is a requirement for postgres to load the TLS certificates mounted on a secret volume (which will be handled by #690).
So now the question is, why not always set the FSGroup to match the postgres GID?