Skip to content

Commit 91b6754

Browse files
SkeLLLaxatuke
authored andcommitted
feat(helm): add connection uri param (supertokens#29)
* Bump Versions (supertokens#27) * Bump image tag * Bump app ver * feat(helm): add connection uri param * fix: versions --------- Co-authored-by: Aayushman Choudhary <Aayushmanchaudhory@gmail.com>
1 parent 7a2cc35 commit 91b6754

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

helm-chart/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ SuperTokens Core Deployment
1919
| autoscaling.minReplicas | int | `1` | minimal replica count when autoscaling |
2020
| autoscaling.targetCPUUtilizationPercentage | int | `80` | target CPU usage before autoscaling |
2121
| basePath | string | `""` | |
22+
| database.uri | string | `""` | database uri (connection string), used instead of other DB params if not empty |
2223
| database.host | string | `"postgres.postgres"` | database host |
2324
| database.name | string | `"supertokens"` | database name |
2425
| database.password | string | `"password"` | database password |

helm-chart/templates/secrets.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@ metadata:
77
{{ include "supertokens.labels" . | indent 4}}
88
type: Opaque
99
stringData:
10+
{{- if .Values.database.uri }}
11+
POSTGRESQL_CONNECTION_URI: {{ quote .Values.database.uri }}
12+
{{- else }}
1013
POSTGRESQL_DATABASE_NAME: {{ quote .Values.database.name }}
1114
POSTGRESQL_PORT: {{ quote .Values.database.port }}
1215
POSTGRESQL_HOST: {{ quote .Values.database.host }}
1316
POSTGRESQL_USER: {{ quote .Values.database.user }}
1417
POSTGRESQL_PASSWORD: {{ quote .Values.database.password }}
18+
{{- end }}
1519
{{- if .Values.apiKeys.enabled }}
1620
API_KEYS: "{{ join "," .Values.apiKeys.keys }}"
1721
{{- end }}

helm-chart/values.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ fullnameOverride: ""
1313
existingSecret: null
1414

1515
database:
16+
# -- database uri (connection string), used instaed of other params if not empty
17+
uri: ""
1618
# -- database name
1719
name: supertokens
1820
# -- database port
1921
port: 5432
2022
# -- database host
2123
host: postgres.postgres
22-
# -- database user
24+
# -- database user
2325
user: postgres
2426
# -- database password
2527
password: password

0 commit comments

Comments
 (0)