Skip to content

Commit

Permalink
fix: add support for connectionPooler (#1677)
Browse files Browse the repository at this point in the history
* fix: add support for connectionPooler

* fix: modify the secretKeyRef check for pooler

* fix: modify the secretKeyRef check for pooler

* fix: pass secretkey name and key as well

* fix: use default connectionPooler secretKeyRef name in values.yaml

* fix: remove trailing spaces to pass lint test
  • Loading branch information
dabasvibhor authored Feb 21, 2024
1 parent c693cb4 commit d930389
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
12 changes: 10 additions & 2 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,16 @@ spec:
{{- if eq .Values.db.external.enabled true }}
valueFrom:
secretKeyRef:
name: {{ .Values.db.external.secretKeyRef.name }}
key: {{ .Values.db.external.secretKeyRef.key }}
name: {{- if .Values.db.connectionPooler.enabled -}}
{{ .Values.db.connectionPooler.secretKeyRef.name }}
{{- else -}}
{{ .Values.db.external.secretKeyRef.name -}}
{{- end }}
key: {{- if .Values.db.connectionPooler.enabled -}}
{{ .Values.db.connectionPooler.secretKeyRef.key }}
{{- else -}}
{{ .Values.db.external.secretKeyRef.key -}}
{{- end }}
{{- else }}
value: "embedded:///opt/database/"
{{- end }}
Expand Down
5 changes: 5 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ otel:

db:
runMigrations: true
connectionPooler:
enabled: false
secretKeyRef:
name: mission-control-connection-pooler
key: DB_URL
embedded:
# If the database is embedded, setting this to true will persist the contents of the database
# through a persistent volume
Expand Down

0 comments on commit d930389

Please sign in to comment.