diff --git a/stable/postgresql/Chart.yaml b/stable/postgresql/Chart.yaml index 3ccef208ed..4058212292 100644 --- a/stable/postgresql/Chart.yaml +++ b/stable/postgresql/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: postgresql -version: 3.18.4 +version: 4.0.0 appVersion: 10.7.0 description: Chart for PostgreSQL, an object-relational database management system (ORDBMS) with an emphasis on extensibility and on standards-compliance. keywords: diff --git a/stable/postgresql/README.md b/stable/postgresql/README.md index 0d2f4a9d55..71fed6f19b 100644 --- a/stable/postgresql/README.md +++ b/stable/postgresql/README.md @@ -298,6 +298,16 @@ This way, the credentials will be available in all of the subcharts. ## Upgrade +### 4.0.0 + +This chart will use by default the Bitnami PostgreSQL container starting from version `10.7.0-r68`. This version moves the initialization logic from node.js to bash. This new version of the chart requires setting the `POSTGRES_PASSWORD` in the slaves as well, in order to properly configure the `pg_hba.conf` file. Users from previous versions of the chart are advised to upgrade immediately. + +IMPORTANT: If you do not want to upgrade the chart version then make sure you use the `10.7.0-r68` version of the container. Otherwise, you will get this error + +``` +The POSTGRESQL_PASSWORD environment variable is empty or not set. Set the environment variable ALLOW_EMPTY_PASSWORD=yes to allow the container to be started with blank passwords. This is recommended only for development +``` + ### 3.0.0 This releases make it possible to specify different nodeSelector, affinity and tolerations for master and slave pods. diff --git a/stable/postgresql/templates/statefulset-slaves.yaml b/stable/postgresql/templates/statefulset-slaves.yaml index 23cee0bc1d..04fee94ce6 100644 --- a/stable/postgresql/templates/statefulset-slaves.yaml +++ b/stable/postgresql/templates/statefulset-slaves.yaml @@ -116,6 +116,16 @@ spec: value: {{ template "postgresql.fullname" . }} - name: POSTGRES_MASTER_PORT_NUMBER value: {{ include "postgresql.port" . | quote }} + {{- if .Values.usePasswordFile }} + - name: POSTGRES_PASSWORD_FILE + value: "/opt/bitnami/postgresql/secrets/postgresql-password" + {{- else }} + - name: POSTGRES_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "postgresql.secretName" . }} + key: postgresql-password + {{- end }} ports: - name: postgresql containerPort: {{ template "postgresql.port" . }} diff --git a/stable/postgresql/values-production.yaml b/stable/postgresql/values-production.yaml index dcae215c24..8a27e7dc98 100644 --- a/stable/postgresql/values-production.yaml +++ b/stable/postgresql/values-production.yaml @@ -96,7 +96,7 @@ postgresqlUsername: postgres ## PostgreSQL data dir ## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md ## -postgresqlDataDir: /bitnami/postgresql +postgresqlDataDir: /bitnami/postgresql/data ## Specify extra initdb args ## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md diff --git a/stable/postgresql/values.yaml b/stable/postgresql/values.yaml index d4a25d45df..82f965778b 100644 --- a/stable/postgresql/values.yaml +++ b/stable/postgresql/values.yaml @@ -102,7 +102,7 @@ postgresqlUsername: postgres ## PostgreSQL data dir ## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md ## -postgresqlDataDir: /bitnami/postgresql +postgresqlDataDir: /bitnami/postgresql/data ## Specify extra initdb args ## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md