From 7d9b2791153b723a3e4c928ec6f34ecf363aafbe Mon Sep 17 00:00:00 2001 From: Alex <2273103+SkeLLLa@users.noreply.github.com> Date: Thu, 30 Nov 2023 07:05:07 +0100 Subject: [PATCH] feat(helm): add connection uri param (#29) * Bump Versions (#27) * Bump image tag * Bump app ver * feat(helm): add connection uri param * fix: versions --------- Co-authored-by: Aayushman Choudhary --- helm-chart/Chart.yaml | 4 ++-- helm-chart/README.md | 1 + helm-chart/templates/secrets.yaml | 4 ++++ helm-chart/values.yaml | 4 +++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/helm-chart/Chart.yaml b/helm-chart/Chart.yaml index 47ddaee..1f13cde 100644 --- a/helm-chart/Chart.yaml +++ b/helm-chart/Chart.yaml @@ -14,10 +14,10 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.2 +version: 0.1.3 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "3.14.0" +appVersion: "7.0.0" diff --git a/helm-chart/README.md b/helm-chart/README.md index 07b7a56..cf5f768 100644 --- a/helm-chart/README.md +++ b/helm-chart/README.md @@ -19,6 +19,7 @@ SuperTokens Core Deployment | autoscaling.minReplicas | int | `1` | minimal replica count when autoscaling | | autoscaling.targetCPUUtilizationPercentage | int | `80` | target CPU usage before autoscaling | | basePath | string | `""` | | +| database.uri | string | `""` | database uri (connection string), used instead of other DB params if not empty | | database.host | string | `"postgres.postgres"` | database host | | database.name | string | `"supertokens"` | database name | | database.password | string | `"password"` | database password | diff --git a/helm-chart/templates/secrets.yaml b/helm-chart/templates/secrets.yaml index c216aac..77550d0 100644 --- a/helm-chart/templates/secrets.yaml +++ b/helm-chart/templates/secrets.yaml @@ -7,11 +7,15 @@ metadata: {{ include "supertokens.labels" . | indent 4}} type: Opaque stringData: +{{- if .Values.database.uri }} + POSTGRESQL_CONNECTION_URI: {{ quote .Values.database.uri }} +{{- else }} POSTGRESQL_DATABASE_NAME: {{ quote .Values.database.name }} POSTGRESQL_PORT: {{ quote .Values.database.port }} POSTGRESQL_HOST: {{ quote .Values.database.host }} POSTGRESQL_USER: {{ quote .Values.database.user }} POSTGRESQL_PASSWORD: {{ quote .Values.database.password }} +{{- end }} {{- if .Values.apiKeys.enabled }} API_KEYS: "{{ join "," .Values.apiKeys.keys }}" {{- end }} diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index d285f3b..3369836 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -2,7 +2,7 @@ image: repository: supertokens/supertokens-postgresql pullPolicy: IfNotPresent # -- Overrides the image tag whose default is the chart appVersion. - tag: "3.14" + tag: "7.0" replicaCount: 1 imagePullSecrets: [] @@ -13,6 +13,8 @@ fullnameOverride: "" existingSecret: null database: + # -- database uri (connection string), used instaed of other params if not empty + uri: "" # -- database name name: supertokens # -- database port