2021-10-20 14:13:56 +00:00
|
|
|
image:
|
|
|
|
repository: bitnami/postgresql
|
|
|
|
pullPolicy: IfNotPresent
|
|
|
|
tag: 13.4.0@sha256:6ae26c46c20358fb2889a759d11d237b1d6d5f73ba206ef3d66f95448a859382
|
|
|
|
|
|
|
|
securityContext:
|
|
|
|
readOnlyRootFilesystem: false
|
|
|
|
|
|
|
|
service:
|
|
|
|
main:
|
|
|
|
enabled: true
|
|
|
|
ports:
|
|
|
|
main:
|
|
|
|
port: 5432
|
|
|
|
|
|
|
|
## TODO: Fix the backup-on-upgrade system
|
|
|
|
enableUpgradeBackup: false
|
|
|
|
|
2021-10-20 23:30:01 +00:00
|
|
|
initContainers:
|
|
|
|
migrate-db:
|
|
|
|
image: "{{ .Values.alpineImage.repository}}:{{ .Values.alpineImage.tag }}"
|
|
|
|
securityContext:
|
|
|
|
runAsUser: 0
|
|
|
|
privileged: true
|
|
|
|
|
|
|
|
runAsNonRoot: false
|
|
|
|
command:
|
|
|
|
- /bin/sh
|
|
|
|
- -cx
|
|
|
|
- |
|
|
|
|
echo 'trying to migrate old db to new location...'
|
|
|
|
mkdir -p /bitnami/postgresql/data
|
|
|
|
mv -f /bitnami/postgresql/old/* /bitnami/postgresql/data/ || true
|
|
|
|
chown -R {{ .Values.podSecurityContext.runAsUser }}:{{ .Values.podSecurityContext.fsGroup }} /bitnami/postgresql/data
|
|
|
|
chmod 775 /bitnami/postgresql/data
|
|
|
|
imagePullPolicy: IfNotPresent
|
|
|
|
volumeMounts:
|
|
|
|
- name: db
|
|
|
|
mountPath: /bitnami/postgresql
|
|
|
|
- name: data
|
|
|
|
mountPath: /bitnami/postgresql/old
|
|
|
|
|
2021-10-20 14:13:56 +00:00
|
|
|
podSecurityContext:
|
|
|
|
runAsGroup: 0
|
|
|
|
|
|
|
|
persistence:
|
|
|
|
db:
|
|
|
|
enabled: true
|
2021-10-26 09:10:08 +00:00
|
|
|
mountPath: "/bitnami/postgresql"
|
2021-10-20 14:13:56 +00:00
|
|
|
type: pvc
|
|
|
|
accessMode: ReadWriteOnce
|
|
|
|
size: "999Gi"
|
|
|
|
data:
|
|
|
|
enabled: true
|
2021-10-26 09:10:08 +00:00
|
|
|
mountPath: "/bitnami/postgresql/old"
|
2021-10-20 14:13:56 +00:00
|
|
|
type: pvc
|
|
|
|
accessMode: ReadWriteOnce
|
|
|
|
size: "999Gi"
|
2021-10-20 23:30:01 +00:00
|
|
|
storageClass: "-"
|
2021-10-20 14:13:56 +00:00
|
|
|
|
|
|
|
postgresqlPassword: "testpass"
|
|
|
|
postgresqlUsername: "test"
|
|
|
|
postgresqlDatabase: "test"
|
|
|
|
existingSecret: ""
|
|
|
|
|
|
|
|
envValueFrom:
|
|
|
|
POSTGRES_PASSWORD:
|
|
|
|
secretKeyRef:
|
|
|
|
name: '{{ ( tpl .Values.existingSecret $ ) | default ( include "common.names.fullname" . ) }}'
|
|
|
|
key: "postgresql-password"
|
|
|
|
|
|
|
|
envTpl:
|
|
|
|
POSTGRES_USER: "{{ .Values.postgresqlUsername }}"
|
|
|
|
POSTGRES_DB: "{{ .Values.postgresqlDatabase }}"
|
|
|
|
# POSTGRESQL_POSTGRES_PASSWORD: "{{ .Values.postgrespassword }}"
|
|
|
|
# POSTGRESQL_PASSWORD: "{{ .Values.password }}"
|