Skip to content

Commit

Permalink
feat(unleash): db - username and password, not url to connect (#135)
Browse files Browse the repository at this point in the history
* feat(unleash): db - username and password, not url to connect

Handling special characters in postgres database urls can be challenging. Using username and password directly is easier. I have tested this with the password 'unl:e@sh:444'
  • Loading branch information
gardleopard authored Mar 4, 2024
1 parent 9b430c2 commit af75e9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/unleash/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ sources:
- https://github.com/Unleash/unleash
- https://github.com/Unleash/helm-charts
type: application
version: 4.0.0
version: 4.0.1
6 changes: 2 additions & 4 deletions charts/unleash/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,14 @@ spec:
value: "{{ .Values.dbConfig.database }}"
- name: DATABASE_HOST
value: "{{ if .Values.postgresql.enabled }}{{ .Values.postgresql.fullnameOverride }}{{ else }}{{ .Values.dbConfig.host }}{{ end }}"
- name: DATABASE_PASS
- name: DATABASE_PASSWORD
value: "{{ if or (.Values.dbConfig.useExistingSecret.name) (.Values.postgresql.enabled) }}$(POSTGRESQL_PASSWORD){{ else }}{{ .Values.dbConfig.pass }}{{ end }}"
- name: DATABASE_PORT
value: "{{ .Values.dbConfig.port }}"
- name: DATABASE_USER
- name: DATABASE_USERNAME
value: "{{ .Values.dbConfig.user }}"
- name: DATABASE_SSL
value: {{ if .Values.dbConfig.ssl }}{{ .Values.dbConfig.ssl | toJson | quote }}{{ else }}"{{ "false" }}"{{ end }}
- name: DATABASE_URL
value: "postgres://$(DATABASE_USER):$(DATABASE_PASS)@$(DATABASE_HOST):$(DATABASE_PORT)/$(DATABASE)"
{{- if .Values.dbConfig.schema }}
- name: DATABASE_SCHEMA
value: "{{ .Values.dbConfig.schema }}"
Expand Down

0 comments on commit af75e9d

Please sign in to comment.