(feat) move postgresql init and password-generator to common (#1113)

* Move Postgresql initcontainer to common

* bump common

* Handle postgres password generation in common and inject into values.yaml for use in Apps

* (refactor) adapt apps using postgresql to common init and password generator

* no message
This commit is contained in:
Kjeld Schouten-Lebbing
2021-10-09 19:24:45 +02:00
committed by GitHub
parent ce48246b9b
commit 2679fc1108
21 changed files with 93 additions and 305 deletions
+1 -22
View File
@@ -8,32 +8,12 @@ image:
securityContext:
readOnlyRootFilesystem: false
postgresqlImage:
repository: bitnami/postgresql
pullPolicy: IfNotPresent
tag: 13.4.0@sha256:e7526fc32deec708740784d907bcea2ef6c78bc5ab5265026eff96e70082a54a
service:
main:
ports:
main:
port: 8080
initContainers:
init-postgresdb:
image: "{{ .Values.postgresqlImage.repository}}:{{ .Values.postgresqlImage.tag }}"
command:
- "sh"
- "-c"
- "until pg_isready -U firefly -h ${pghost} ; do sleep 2 ; done"
imagePullPolicy: IfNotPresent
env:
- name: pghost
valueFrom:
secretKeyRef:
name: dbcreds
key: plainhost
probes:
liveness:
path: "/login"
@@ -55,7 +35,7 @@ envValueFrom:
DB_HOST:
secretKeyRef:
name: dbcreds
key: postgresql_host
key: plainhost
DB_PASSWORD:
secretKeyRef:
name: dbcreds
@@ -74,4 +54,3 @@ postgresql:
enabled: true
postgresqlUsername: firefly
postgresqlDatabase: firefly
existingSecret: dbcreds