-
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
Changes from 1 commit
a32408b
4a39a1f
f47db8e
9c726c4
8e11d43
5ca0d49
4ef745e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
This is the PostgreSQL Bitnami chart. | ||
|
||
Configure the values.yaml file to create the database, username, password and other configuration. | ||
List of parameters available - https://artifacthub.io/packages/helm/bitnami/postgresql#parameters | ||
|
||
For persisting data, you can configure your choice of storageClass with your provisioner. | ||
|
||
Or, create a storage class and of PVs based on no. of replicas with no provisioner - | ||
``` | ||
apiVersion: storage.k8s.io/v1 | ||
kind: StorageClass | ||
metadata: | ||
name: local-storage | ||
provisioner: kubernetes.io/no-provisioner | ||
volumeBindingMode: WaitForFirstConsumer | ||
reclaimPolicy: Retain | ||
allowVolumeExpansion: true | ||
|
||
--- | ||
|
||
Prepare volume on host and give right permissions - | ||
mkdir -p /data/local-storage | ||
chmod -R 775 /data/local-storage | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolume | ||
metadata: | ||
name: local-pv | ||
spec: | ||
capacity: | ||
storage: 10Gi | ||
accessModes: | ||
- ReadWriteMany | ||
persistentVolumeReclaimPolicy: Retain | ||
storageClassName: local-storage | ||
hostPath: | ||
path: /data/local-storage | ||
``` | ||
|
||
To deploy the helm chart - | ||
``` | ||
helm install postgresql charts/postgresql --values charts/postgresql/values.yaml | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
dependencies: | ||
- name: postgresql | ||
version: 11.9.8 | ||
repository: https://charts.bitnami.com/bitnami |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
architecture: replication | ||
global: | ||
storageClass: local-storage | ||
auth: | ||
replicationPassword: externalPostgresql | ||
postgresPassword: externalPostgresql | ||
username: externalPostgresql | ||
password: externalPostgresql | ||
database: externalPostgresql | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
readReplicas: | ||
name: read | ||
replicaCount: 2 | ||
replication: | ||
numSynchronousReplicas: 2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
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-levelpostgresql:
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 👍