refactor pooler tls support and set pooler pod security context#2255
Merged
Conversation
FxKu
requested review from
Jan-M,
hughcapet,
idanovinda,
jopadi and
sdudoladov
as code owners
March 7, 2023 19:44
Contributor
Author
|
@heilerich could you check for me that with this PR, your problems with Pooler TLS will be solved? Thie image you can use is: registry.opensource.zalan.do/acid/postgres-operator-test:c9f4e9c-pr-2255-3 |
|
I tested with
and could find no apparent problems. Thanks for the effort 👍🏻 |
Collaborator
|
👍 |
1 similar comment
Contributor
Author
|
👍 |
This was referenced Apr 17, 2023
Contributor
|
@FxKu |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a follow up PR to #2219 which refactors the way the volume mounts are generated for spilo and pooler pods when spec.TLS is specified. My idea here is to unify have just one function in k8sres.go which generates environment variables and additional volumes to be used for the pod templates. For pooler pods we do not use generatePodTemplate function so the rest of the code is a little different there.
There are a few fixes along the way:
spec.TLS.SecretNameANDspec.TLS.CASecretNameFSGroupof pooler pod securityContext but alsoRunAsUserandRunAsGroup. See also Set SecurityContext for connection pooler #2225 which uses hardcoded values user: 100 and group: 101. Seems that this is burned into our pgbouncer image so we should not reuse the spilo config values.Bumping the pooler image which support of CONNECTION_POOLER_CLIENT_CA_FILE.