diff --git a/bitnami/postgresql-ha/Chart.yaml b/bitnami/postgresql-ha/Chart.yaml index fa8d7893c85932..5d9f78ee7c6cf2 100644 --- a/bitnami/postgresql-ha/Chart.yaml +++ b/bitnami/postgresql-ha/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: postgresql-ha -version: 1.4.3 +version: 1.5.0 appVersion: 11.6.0 description: Chart for PostgreSQL with HA architecture (using Replication Manager (repmgr) and Pgpool). keywords: diff --git a/bitnami/postgresql-ha/README.md b/bitnami/postgresql-ha/README.md index ec90948647fb7f..b16ccd2a98da36 100644 --- a/bitnami/postgresql-ha/README.md +++ b/bitnami/postgresql-ha/README.md @@ -106,7 +106,7 @@ The following table lists the configurable parameters of the PostgreSQL HA chart | `postgresql.extendedConf` | Extended PostgreSQL Configuration (appended to main or default configuration) | `nil` | | `postgresql.extendedConfCM` | ConfigMap with the extended PostgreSQL configuration files (Note: Overrides `postgresql.extendedConf`) | `nil` (The value is evaluated as a template) | | `postgresql.initdbScripts` | Dictionary of initdb scripts | `nil` | -| `postgresql.initdbScriptsCM` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` (The value is evaluated as a template) | +| `postgresql.initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` (The value is evaluated as a template) | | **Pgpool** | | | | `pgpoolImage.registry` | Registry for Pgpool | `docker.io` | | `pgpoolImage.repository` | Repository for Pgpool | `bitnami/pgpool` | @@ -322,7 +322,7 @@ The [Bitnami PostgreSQL with Repmgr](https://github.com/bitnami/bitnami-docker-p Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. -In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `postgresql.initdbScriptsCM` parameter. Note that this will override the two previous options. If your initialization scripts contain sensitive information such as credentials or passwords, you can use the `initdbScriptsSecret` parameter. +In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `postgresql.initdbScriptsConfigMap` parameter. Note that this will override the two previous options. If your initialization scripts contain sensitive information such as credentials or passwords, you can use the `initdbScriptsSecret` parameter. The allowed extensions are `.sh`, `.sql` and `.sql.gz`. diff --git a/bitnami/postgresql-ha/templates/_helpers.tpl b/bitnami/postgresql-ha/templates/_helpers.tpl index b3cd3a296f4fca..a49ce3761e1a7f 100644 --- a/bitnami/postgresql-ha/templates/_helpers.tpl +++ b/bitnami/postgresql-ha/templates/_helpers.tpl @@ -539,8 +539,8 @@ Return the Pgpool configuration configmap. Return the PostgreSQL initdb scripts configmap. */}} {{- define "postgresql-ha.postgresqlInitdbScriptsCM" -}} -{{- if .Values.postgresql.initdbScriptsCM -}} -{{- printf "%s" (tpl .Values.postgresql.initdbScriptsCM $) -}} +{{- if .Values.postgresql.initdbScriptsConfigMap -}} +{{- printf "%s" (tpl .Values.postgresql.initdbScriptsConfigMap $) -}} {{- else -}} {{- printf "%s-initdb-scripts" (include "postgresql-ha.postgresql" .) -}} {{- end -}} @@ -550,8 +550,8 @@ Return the PostgreSQL initdb scripts configmap. Return the Pgpool initdb scripts configmap. */}} {{- define "postgresql-ha.pgpoolInitdbScriptsCM" -}} -{{- if .Values.pgpool.initdbScriptsCM -}} -{{- printf "%s" (tpl .Values.pgpool.initdbScriptsCM $) -}} +{{- if .Values.pgpool.initdbScriptsConfigMap -}} +{{- printf "%s" (tpl .Values.pgpool.initdbScriptsConfigMap $) -}} {{- else -}} {{- printf "%s-initdb-scripts" (include "postgresql-ha.pgpool" .) -}} {{- end -}} diff --git a/bitnami/postgresql-ha/templates/pgpool/deployment.yaml b/bitnami/postgresql-ha/templates/pgpool/deployment.yaml index ec66d363a07330..2e0279e34ebebe 100644 --- a/bitnami/postgresql-ha/templates/pgpool/deployment.yaml +++ b/bitnami/postgresql-ha/templates/pgpool/deployment.yaml @@ -153,7 +153,7 @@ spec: - name: pgpool-config mountPath: /opt/bitnami/pgpool/conf/ {{- end }} - {{- if or (.Files.Glob "files/pgpool-entrypoint-initdb.d/*.sh") .Values.pgpool.initdbScripts .Values.pgpool.initdbScriptsCM }} + {{- if or (.Files.Glob "files/pgpool-entrypoint-initdb.d/*.sh") .Values.pgpool.initdbScripts .Values.pgpool.initdbScriptsConfigMap }} - name: custom-init-scripts mountPath: /docker-entrypoint-initdb.d/ {{- end }} @@ -171,7 +171,7 @@ spec: configMap: name: {{ include "postgresql-ha.pgpoolConfigurationCM" . }} {{- end }} - {{- if or (.Files.Glob "files/pgpool-entrypoint-initdb.d/*.sh") .Values.pgpool.initdbScripts .Values.pgpool.initdbScriptsCM }} + {{- if or (.Files.Glob "files/pgpool-entrypoint-initdb.d/*.sh") .Values.pgpool.initdbScripts .Values.pgpool.initdbScriptsConfigMap }} - name: custom-init-scripts configMap: name: {{ template "postgresql-ha.pgpoolInitdbScriptsCM" . }} diff --git a/bitnami/postgresql-ha/templates/pgpool/initdb-scripts-configmap.yaml b/bitnami/postgresql-ha/templates/pgpool/initdb-scripts-configmap.yaml index 902aab3d796d5c..7e750d463e3b0c 100644 --- a/bitnami/postgresql-ha/templates/pgpool/initdb-scripts-configmap.yaml +++ b/bitnami/postgresql-ha/templates/pgpool/initdb-scripts-configmap.yaml @@ -1,4 +1,4 @@ -{{- if and (or (.Files.Glob "files/pgpool-entrypoint-initdb.d/*.sh") .Values.pgpool.initdbScripts) (not .Values.pgpool.initdbScriptsCM) }} +{{- if and (or (.Files.Glob "files/pgpool-entrypoint-initdb.d/*.sh") .Values.pgpool.initdbScripts) (not .Values.pgpool.initdbScriptsConfigMap) }} apiVersion: v1 kind: ConfigMap metadata: diff --git a/bitnami/postgresql-ha/templates/postgresql/initdb-scripts-configmap.yaml b/bitnami/postgresql-ha/templates/postgresql/initdb-scripts-configmap.yaml index 99b4f1d13f4c26..ff0ed8e405905b 100644 --- a/bitnami/postgresql-ha/templates/postgresql/initdb-scripts-configmap.yaml +++ b/bitnami/postgresql-ha/templates/postgresql/initdb-scripts-configmap.yaml @@ -1,4 +1,4 @@ -{{- if and (or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.postgresql.initdbScripts) (not .Values.postgresql.initdbScriptsCM) }} +{{- if and (or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.postgresql.initdbScripts) (not .Values.postgresql.initdbScriptsConfigMap) }} apiVersion: v1 kind: ConfigMap metadata: diff --git a/bitnami/postgresql-ha/templates/postgresql/statefulset.yaml b/bitnami/postgresql-ha/templates/postgresql/statefulset.yaml index 9c653ae370bee1..958930024be4db 100644 --- a/bitnami/postgresql-ha/templates/postgresql/statefulset.yaml +++ b/bitnami/postgresql-ha/templates/postgresql/statefulset.yaml @@ -182,7 +182,7 @@ spec: - name: postgresql-extended-config mountPath: /bitnami/postgresql/conf/conf.d/ {{- end }} - {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.postgresql.initdbScriptsCM .Values.postgresql.initdbScripts }} + {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.postgresql.initdbScriptsConfigMap .Values.postgresql.initdbScripts }} - name: custom-init-scripts mountPath: /docker-entrypoint-initdb.d/ {{- end }} @@ -268,7 +268,7 @@ spec: secret: secretName: {{ include "postgresql-ha.postgresqlSecretName" . }} {{- end }} - {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.postgresql.initdbScriptsCM .Values.postgresql.initdbScripts }} + {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.postgresql.initdbScriptsConfigMap .Values.postgresql.initdbScripts }} - name: custom-init-scripts configMap: name: {{ template "postgresql-ha.postgresqlInitdbScriptsCM" . }} diff --git a/bitnami/postgresql-ha/values-production.yaml b/bitnami/postgresql-ha/values-production.yaml index dbca6306732d79..1539e43055ee98 100644 --- a/bitnami/postgresql-ha/values-production.yaml +++ b/bitnami/postgresql-ha/values-production.yaml @@ -280,7 +280,7 @@ postgresql: ## ConfigMap with scripts to be run at first boot ## NOTE: This will override initdbScripts ## - # initdbScriptsCM: + # initdbScriptsConfigMap: ## Pgpool parameters ## @@ -388,7 +388,7 @@ pgpool: ## ConfigMap with scripts to be run everytime Pgpool container is initialized ## NOTE: This will override pgpool.initdbScripts ## - # initdbScriptsCM: + # initdbScriptsConfigMap: ## Use Pgpool Load-Balancing ## diff --git a/bitnami/postgresql-ha/values.yaml b/bitnami/postgresql-ha/values.yaml index 18b3ee10fa1944..bf1086817cdc1b 100644 --- a/bitnami/postgresql-ha/values.yaml +++ b/bitnami/postgresql-ha/values.yaml @@ -280,7 +280,7 @@ postgresql: ## ConfigMap with scripts to be run at first boot ## NOTE: This will override initdbScripts ## - # initdbScriptsCM: + # initdbScriptsConfigMap: ## Pgpool parameters ## @@ -388,7 +388,7 @@ pgpool: ## ConfigMap with scripts to be run everytime Pgpool container is initialized ## NOTE: This will override pgpool.initdbScripts ## - # initdbScriptsCM: + # initdbScriptsConfigMap: ## Use Pgpool Load-Balancing ##