Skip to content

Commit

Permalink
feat(helm): add connection uri param (supertokens#29)
Browse files Browse the repository at this point in the history
* Bump Versions (supertokens#27)

* Bump image tag

* Bump app ver

* feat(helm): add connection uri param

* fix: versions

---------

Co-authored-by: Aayushman Choudhary <[email protected]>
  • Loading branch information
2 people authored and brianineza01 committed May 30, 2024
1 parent 7a2cc35 commit 91b6754
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions helm-chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
4 changes: 4 additions & 0 deletions helm-chart/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 3 additions & 1 deletion helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ fullnameOverride: ""
existingSecret: null

database:
# -- database uri (connection string), used instaed of other params if not empty
uri: ""
# -- database name
name: supertokens
# -- database port
port: 5432
# -- database host
host: postgres.postgres
# -- database user
# -- database user
user: postgres
# -- database password
password: password
Expand Down

0 comments on commit 91b6754

Please sign in to comment.