Skip to content

Commit

Permalink
Added option for custom environment variables for PostgreSQL. (helm#7589
Browse files Browse the repository at this point in the history
)

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ć <[email protected]>
  • Loading branch information
bokysan authored and Dario Blanco committed Oct 22, 2018
1 parent ee4436d commit 41f1999
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/postgresql/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
1 change: 1 addition & 0 deletions stable/postgresql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
3 changes: 3 additions & 0 deletions stable/postgresql/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions stable/postgresql/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}

0 comments on commit 41f1999

Please sign in to comment.