From ac3aa9fe6ff434dc1315036f5f0948f2c568e0bb Mon Sep 17 00:00:00 2001 From: "jonathan.striebel" Date: Wed, 28 Feb 2018 22:09:45 +0100 Subject: [PATCH] postgresql: added postgresConfig value to specify runtime config parameters (#3780) --- stable/postgresql/Chart.yaml | 2 +- stable/postgresql/README.md | 1 + stable/postgresql/templates/deployment.yaml | 5 +++++ stable/postgresql/values.yaml | 5 +++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/stable/postgresql/Chart.yaml b/stable/postgresql/Chart.yaml index da406530c1..dd76118e8e 100644 --- a/stable/postgresql/Chart.yaml +++ b/stable/postgresql/Chart.yaml @@ -1,5 +1,5 @@ name: postgresql -version: 0.8.14 +version: 0.9.0 description: Object-relational database management system (ORDBMS) with an emphasis on extensibility and on standards-compliance. keywords: - postgresql diff --git a/stable/postgresql/README.md b/stable/postgresql/README.md index 260eeae35b..5051d8a386 100644 --- a/stable/postgresql/README.md +++ b/stable/postgresql/README.md @@ -53,6 +53,7 @@ The following tables lists the configurable parameters of the PostgreSQL chart a | `postgresPassword` | Password for the new user. | random 10 characters | | `postgresDatabase` | Name for new database to create. | `postgres` | | `postgresInitdbArgs` | Initdb Arguments | `nil` | +| `postgresConfig` | Runtime Config Parameters | `nil` | | `persistence.enabled` | Use a PVC to persist data | `true` | | `persistence.existingClaim`| Provide an existing PersistentVolumeClaim | `nil` | | `persistence.storageClass` | Storage class of backing PVC | `nil` (uses alpha storage class annotation) | diff --git a/stable/postgresql/templates/deployment.yaml b/stable/postgresql/templates/deployment.yaml index 2226514573..2e8a8393ac 100644 --- a/stable/postgresql/templates/deployment.yaml +++ b/stable/postgresql/templates/deployment.yaml @@ -29,6 +29,11 @@ spec: - name: {{ template "postgresql.fullname" . }} image: "{{ .Values.image }}:{{ .Values.imageTag }}" imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }} + args: + {{- range $key, $value := default dict .Values.postgresConfig }} + - -c + - '{{ $key | snakecase }}={{ $value }}' + {{- end }} env: - name: POSTGRES_USER value: {{ default "postgres" .Values.postgresUser | quote }} diff --git a/stable/postgresql/values.yaml b/stable/postgresql/values.yaml index 83673e5738..28e8e9c996 100644 --- a/stable/postgresql/values.yaml +++ b/stable/postgresql/values.yaml @@ -31,6 +31,11 @@ imageTag: "9.6.2" ## ref: https://www.postgresql.org/docs/current/static/app-initdb.html # postgresInitdbArgs: +## Specify runtime config parameters as a dict, using camelCase, e.g. +## {"sharedBuffers": "500MB"} +## ref: https://www.postgresql.org/docs/current/static/runtime-config.html +# postgresConfig: + ## Persist data to a persitent volume persistence: enabled: true