(fix) use the correct initcontainer for postgresql on scale

This commit is contained in:
kjeld Schouten-Lebbing 2021-09-26 10:53:36 +02:00
parent 7d74eaeffb
commit a8dd9ecc19
No known key found for this signature in database
GPG Key ID: 4CDAD4A532BC1EDB
1 changed files with 1 additions and 4 deletions

View File

@ -23,12 +23,8 @@ initContainers:
- -cx
- |
echo 'trying to migrate old db to new location...'
chown -R {{ .Values.podSecurityContext.runAsUser }}:{{ .Values.podSecurityContext.fsGroup }} /bitnami/postgresql/data /bitnami/postgresql/old
chmod 775 /bitnami/postgresql/data/ bitnami/postgresql/data /bitnami/postgresql/old
mkdir -p /bitnami/postgresql/data
mkdir -p /bitnami/postgresql/conf
mv -f /bitnami/postgresql/old/* /bitnami/postgresql/data/ || true
mv -f /bitnami/postgresql/data/pg_hba.conf /bitnami/postgresql/conf/pg_hba.conf || true
chown -R {{ .Values.podSecurityContext.runAsUser }}:{{ .Values.podSecurityContext.fsGroup }} /bitnami/postgresql/data
chmod 775 /bitnami/postgresql/data
imagePullPolicy: IfNotPresent
@ -38,6 +34,7 @@ initContainers:
- name: data
mountPath: /bitnami/postgresql
envValueFrom:
POSTGRES_PASSWORD:
secretKeyRef: