-
Notifications
You must be signed in to change notification settings - Fork 1
fix: add component that configures unicorn pgbouncer image #162
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
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flavor specific configurations do not belong in the
common/zarf.yaml, but rather the rootzarf.yamlAdditionally, I did not dig into it, but this seems like something that is likely able to be set via one of the charts values files. Did you look into if you could do that before taking this approach? Patching resources via kubectl would be the path of last resort for how to configure something.
Finally, why would this be in its own component rather than an onDeploy.after in the existing component?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this component should be moved to
zarf.yaml?That would be ideal, but the values for the connection pooler are scant. Maybe a better approach is to create a custom deployment template?
I made it a separate component so I could use
only.flavor. Our customer encountered this issue with the unicorn flavor.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you would be able to do it in the root level
zarf.yaml, under the existingunicorncomponent, instead of in thecommon/zarf.yaml.I also wonder though if there is a better way to configure this. If the helm chart does not have values for this, is it something that can be set configurable here?
https://github.com/uds-packages/postgres-operator/blob/main/chart/templates/postgres-minimal.yaml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, that makes sense. Thanks, Cody.
I'm not sure, but I'll give it a shot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes and there is already only.flavor in the root level zarf.yaml for unicorn.
Looking at this deeper it seems like the environment vars should be getting set automatically, but the user/group is "wrong" on this particular image and need to be changed for it to function correctly. It also seems like the user/group that gets assigned to the deployment is hardcoded in the go code.
I need to look into this more, but it seems like the ideal fix is probably swapping out the image, the provider offers several versions.
In order to ensure the proposed change can be validated and not become a problem again, but could you please provide a minimal reproduction of the issue(a test) that would replicate the problem. We generally will add such tests when we run into something like this to ensure we dont have regressions, especially if we change image providers. I can take that and validate all the flavors and bring back to the provider to either have them update the image we are using or get an entitlement to a different image and see if it can be resolved that way.
Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not possible to set security context or environment vars in
postgres-minimal.yaml. The extent of the connection pooler's configuration can be found here.The docs also state that security context is hard coded.

Would moving the component to the root
zarf.yamlbe okay, or should I figure out how to deploy a custom template?