Skip to content

Commit

Permalink
feat(unleash): db - username and password, not url to connect
Browse files Browse the repository at this point in the history
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 committed Mar 4, 2024
1 parent 9b430c2 commit 18ef5c7
Showing 1 changed file with 2 additions and 4 deletions.
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 18ef5c7

Please sign in to comment.