From d8e4f3b561e3f914e8e4751c276aca3f363ecfd2 Mon Sep 17 00:00:00 2001 From: patkearney <37845126+patkearney@users.noreply.github.com> Date: Wed, 2 Oct 2019 09:00:50 +0100 Subject: [PATCH] Add general environment variables option to support PGADMIN_CONFIG_ overrides as per the container docs (#11) * Add general environment variables option to support PGADMIN_CONFIG_ overrides as per the container docs Signed-off-by: Patrick Kearney * bump chart version to 0.1.10 Signed-off-by: Patrick Kearney --- Chart.yaml | 2 +- README.md | 1 + templates/deployment.yaml | 4 ++++ values.yaml | 7 +++++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Chart.yaml b/Chart.yaml index d38417c..951f0f9 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -1,5 +1,5 @@ name: pgadmin -version: 0.1.9 +version: 0.1.10 appVersion: 4.12.0 description: pgAdmin is a web based administration tool for the PostgreSQL database. keywords: diff --git a/README.md b/README.md index 8662e58..6018891 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,7 @@ The following table lists the configurable parameters of the pgAdmin chart and t | `pgadmin.password` | pgAdmin admin password | `admin` | | `pgadmin.tls` | pgAdmin admin TLS. the container will listen on port 80 for connections in plain text. If set to any value, the container will listen on port 443 for TLS connections. When TLS is enabled, a certificate and key must be provided. See [secrets file](/templates/secrets.yaml)| `false` | | `pgadmin.scriptname` | pgAdmin ScriptName Env, See https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html | `nil` | +| `pgadmin.config` | pgAdmin configuration override(s) Env, config.py entries can be overriden by environment variables with the prefix: 'PGADMIN_CONFIG_' | `nil` | | **Persistence** | | `persistence.enabled` | Enable the data persistence or not | `true` | | `persistence.existingClaim` | Provide an existing PersistentVolumeClaim, the value is evaluated as a template | `nil` | diff --git a/templates/deployment.yaml b/templates/deployment.yaml index f4eba64..691d803 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -37,6 +37,10 @@ spec: {{- if .Values.pgadmin.scriptname }} - name: SCRIPT_NAME value: {{ .Values.pgadmin.scriptname }} + {{- end }} + {{- range .Values.pgadmin.config }} + - name: {{ .name | upper }} + value: {{ .value | quote }} {{- end }} ports: - name: http diff --git a/values.yaml b/values.yaml index 022c56a..df26d5c 100644 --- a/values.yaml +++ b/values.yaml @@ -15,6 +15,13 @@ pgadmin: ## See https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html # scriptname: /pgadmin + ## pgadmin config, Any custom environment variabls. Settings in config.py can be overriden with an environment variable using the prefix: PGADMIN_CONFIG_ + ## eg turn off enhanced cookie protection for default AKS, loadbalancer installation + #config: + # - name: "PGADMIN_CONFIG_ENHANCED_COOKIE_PROTECTION" + # value: "False" + + ## Enable persistence using Persistent Volume Claims ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ ##