From f3c377b91c2a3a3f77bc34fecbabecdb90f776d3 Mon Sep 17 00:00:00 2001 From: Peter Belko Date: Wed, 15 Apr 2020 00:12:03 +0200 Subject: [PATCH] Add missing config params supported by Prisma docker image (#21807) Prisma server docker image supports 3 additional parameters which are not possible to set through Helm chart: * database name * SSL enabled flag * max open DB connections Signed-off-by: Peter Belko --- stable/prisma/Chart.yaml | 2 +- stable/prisma/README.md | 3 +++ stable/prisma/templates/configmap.yaml | 3 +++ stable/prisma/templates/deployment.yaml | 6 ++++++ stable/prisma/values.yaml | 12 ++++++++++++ 5 files changed, 25 insertions(+), 1 deletion(-) mode change 100644 => 100755 stable/prisma/templates/configmap.yaml mode change 100644 => 100755 stable/prisma/templates/deployment.yaml diff --git a/stable/prisma/Chart.yaml b/stable/prisma/Chart.yaml index f79b7f86bb..77ec37ff96 100644 --- a/stable/prisma/Chart.yaml +++ b/stable/prisma/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: prisma -version: 1.2.1 +version: 1.2.2 appVersion: 1.29.1 kubeVersion: "^1.8.0-0" description: Prisma turns your database into a realtime GraphQL API diff --git a/stable/prisma/README.md b/stable/prisma/README.md index 404b66e62b..5492b67c1b 100644 --- a/stable/prisma/README.md +++ b/stable/prisma/README.md @@ -50,9 +50,12 @@ Parameter | Description `database.connector` | Database connector | `postgres` `database.host` | Host for the database endpoint | `""` `database.port` | Port for the database endpoint | `""` +`database.name` | Database name for Prisma objects | `prisma` `database.user` | Database user | `prisma` `database.password` | Database password | `""` `database.migrations` | Enable database migrations | `true` +`database.ssl` | Enable SSL for DB connections | `false` +`database.connectionLimit` | The maximum number of database connections | `2` `auth.enabled` | Enable Prisma Management API authentication | `false` `auth.secret` | Secret to use for authentication | `nil` `service.type` | Type of Service | `ClusterIP` diff --git a/stable/prisma/templates/configmap.yaml b/stable/prisma/templates/configmap.yaml old mode 100644 new mode 100755 index e95d1b1d47..8d9fd5de51 --- a/stable/prisma/templates/configmap.yaml +++ b/stable/prisma/templates/configmap.yaml @@ -21,3 +21,6 @@ data: user: $PRISMA_DB_USER password: $PRISMA_DB_PASSWORD migrations: $PRISMA_DB_MIGRATIONS + database: $PRISMA_DB_NAME + ssl: $PRISMA_DB_SSL + connectionLimit: $PRISMA_DB_CONNECTIONLIMIT diff --git a/stable/prisma/templates/deployment.yaml b/stable/prisma/templates/deployment.yaml old mode 100644 new mode 100755 index 647690ced8..53fbdff377 --- a/stable/prisma/templates/deployment.yaml +++ b/stable/prisma/templates/deployment.yaml @@ -63,6 +63,12 @@ spec: key: {{ template "prisma.databaseSecret.key" . }} - name: PRISMA_DB_MIGRATIONS value: {{ .Values.database.migrations | quote }} + - name: PRISMA_DB_NAME + value: {{ .Values.database.name | quote }} + - name: PRISMA_DB_SSL + value: {{ .Values.database.ssl | quote }} + - name: PRISMA_DB_CONNECTIONLIMIT + value: {{ .Values.database.connectionLimit | quote }} resources: {{ toYaml .Values.resources | indent 12 }} {{- with .Values.nodeSelector }} diff --git a/stable/prisma/values.yaml b/stable/prisma/values.yaml index ef157717e2..0f3c15f786 100644 --- a/stable/prisma/values.yaml +++ b/stable/prisma/values.yaml @@ -35,6 +35,18 @@ database: host: "" port: "" + ## Database name where model will be created + ## + name: prisma + + ## Enable SSL + ## + ssl: false + + ## The maximum number of database connections (must be at least 2). + ## + connectionLimit: 2 + ## Database credentials ## user: prisma