Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bitnami/postgresql-ha/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
4 changes: 2 additions & 2 deletions bitnami/postgresql-ha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand Down Expand Up @@ -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`.

Expand Down
8 changes: 4 additions & 4 deletions bitnami/postgresql-ha/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
Expand All @@ -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 -}}
Expand Down
4 changes: 2 additions & 2 deletions bitnami/postgresql-ha/templates/pgpool/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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" . }}
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
4 changes: 2 additions & 2 deletions bitnami/postgresql-ha/templates/postgresql/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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" . }}
Expand Down
4 changes: 2 additions & 2 deletions bitnami/postgresql-ha/values-production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ postgresql:
## ConfigMap with scripts to be run at first boot
## NOTE: This will override initdbScripts
##
# initdbScriptsCM:
# initdbScriptsConfigMap:

## Pgpool parameters
##
Expand Down Expand Up @@ -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
##
Expand Down
4 changes: 2 additions & 2 deletions bitnami/postgresql-ha/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ postgresql:
## ConfigMap with scripts to be run at first boot
## NOTE: This will override initdbScripts
##
# initdbScriptsCM:
# initdbScriptsConfigMap:

## Pgpool parameters
##
Expand Down Expand Up @@ -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
##
Expand Down