From 65403e85b0076ecbeffd2f4693cdca0ee59a0a46 Mon Sep 17 00:00:00 2001 From: Boky Date: Tue, 16 Oct 2018 16:57:04 +0200 Subject: [PATCH] Added option for custom environment variables for PostgreSQL. (#7589) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit enables the user to specify additional environment variables in the postgres chart. This is especially important for custom Postgres images which might have different environment variables for different options or for enabling additional features. Furthermore versions have been updated: - Chart version has been set to 1.0.0, as this is a stable chart Signed-off-by: Bojan Čekrlić --- stable/postgresql/Chart.yaml | 2 +- stable/postgresql/README.md | 1 + stable/postgresql/templates/deployment.yaml | 3 +++ stable/postgresql/values.yaml | 3 +++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/stable/postgresql/Chart.yaml b/stable/postgresql/Chart.yaml index 3c1433454a..8ade036256 100644 --- a/stable/postgresql/Chart.yaml +++ b/stable/postgresql/Chart.yaml @@ -1,5 +1,5 @@ name: postgresql -version: 0.19.0 +version: 1.0.0 appVersion: 9.6.2 description: 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 b4a3de9588..eee4a8b91c 100644 --- a/stable/postgresql/README.md +++ b/stable/postgresql/README.md @@ -92,6 +92,7 @@ The following table lists the configurable parameters of the PostgreSQL chart an | `probes.readiness.failureThreshold` | Readiness probe failure threshold | `5` | | `podAnnotations` | Annotations for the postgresql pod | {} | | `deploymentAnnotations` | Annotations for the postgresql deployment | {} | +| `extraEnv` | Any extra environment variables you would like to pass on to the pod | {} | The above parameters map to the env variables defined in [postgres](http://github.com/docker-library/postgres). For more information please refer to the [postgres](http://github.com/docker-library/postgres) image documentation. diff --git a/stable/postgresql/templates/deployment.yaml b/stable/postgresql/templates/deployment.yaml index 8355715ae1..fe6914b822 100644 --- a/stable/postgresql/templates/deployment.yaml +++ b/stable/postgresql/templates/deployment.yaml @@ -87,6 +87,9 @@ spec: {{- end }} - name: POD_IP valueFrom: { fieldRef: { fieldPath: status.podIP } } +{{- if .Values.extraEnv }} +{{ toYaml .Values.extraEnv | indent 8 }} +{{- end }} ports: - name: postgresql containerPort: 5432 diff --git a/stable/postgresql/values.yaml b/stable/postgresql/values.yaml index 0caca358b3..4ac34499f8 100644 --- a/stable/postgresql/values.yaml +++ b/stable/postgresql/values.yaml @@ -159,3 +159,6 @@ podAnnotations: {} ## Deployment pods replace strategy ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy # strategy: {} + +# Define custom environment variables to pass to the image here +extraEnv: {}