-
Notifications
You must be signed in to change notification settings - Fork 325
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
bitnami/postgresql wrapper to use in different bots and related services #3012
Conversation
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.
This should not be called -external
. Since postgres from this chart runs inside kubernetes.
(The cassandra-external
chart forwards traffic to cassandra deployed outside kubernetes on bare VMs. This is different.)
I'm not sure why we need a hand-rolled postgres helm chart here. There are many postgres charts maintained by the community, for example from bitnami, here: https://github.com/bitnami/charts/tree/main/bitnami/postgresql
Let's use their existing chart instead of needing to maintain a helm chart on software we do not develop.
If you need to re-host this helm chart as part of wire-server (why though?), you could require a third-party helm chart using a requirements.yaml file. But I don't see the benefit really, just use the third-party postgres chart wherever you wish to make use of it.
Your PR does not link to any issue / jira ticket so unfortunately I don't see the added value from this PR, if there might be a usecase I can't easily imagine, please provide more context.
I was little worried if the latest postgresql versions will work with the existing bots, and in the Bitnami chart I tried to replace the image and tags to use older postgresql version, but that didn't worked. |
charts/postgresql/values.yaml
Outdated
readReplicas: | ||
name: read | ||
replicaCount: 2 | ||
replication: | ||
numSynchronousReplicas: 2 |
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.
why do you need more than one replica in your use case (bots)? Would it not be sufficient to have one single replica (and no read replicas)?
Perhaps the first line architecture: replication
could be changed to architecture: standalone
(already the default). If not, please motivate why you need higher availability here at this level, and what this chart is used for (and also where it is used).
charts/postgresql/values.yaml
Outdated
auth: | ||
replicationPassword: externalPostgresql | ||
postgresPassword: externalPostgresql | ||
username: externalPostgresql | ||
password: externalPostgresql | ||
database: externalPostgresql |
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.
Ugh. Can you remove the whole auth block? There should never be any default passwords in plaintext. The user of a helm chart should specify their own passwords. Same for database name and username. Please remove the whole auth block here.
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.
fixed
charts/postgresql/values.yaml
Outdated
@@ -0,0 +1,14 @@ | |||
architecture: replication | |||
global: |
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.
All of the values inside values.yaml
currently have no effect. If you wish to override the defaults provided inside the upstream values.yaml, here: https://github.com/bitnami/charts/blob/main/bitnami/postgresql/values.yaml, then you need to indent them under a top-level postgresql:
section.
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.
Fixed 👍
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.
Looks good now! (I added one small commit to add the chart to the list of charts to be released, this list is hardcoded inside the Makefile currently)
Ticket - https://wearezeta.atlassian.net/browse/SQPIT-574
This the wrapper chart for bitnami/postgresql that can be used in different bots and related services.
An example use case - #2935
Checklist
changelog.d