diff --git a/charts/listmonk/templates/configmap-listmonk.yaml b/charts/listmonk/templates/configmap-listmonk.yaml index d9446ac..7e09b37 100644 --- a/charts/listmonk/templates/configmap-listmonk.yaml +++ b/charts/listmonk/templates/configmap-listmonk.yaml @@ -9,7 +9,6 @@ data: [app] address = "0.0.0.0:80" - # Database. [db] host = "{{- include "listmonk.fullname" .}}-postgres" port = 5432 diff --git a/charts/listmonk/templates/deployment-listmonk.yaml b/charts/listmonk/templates/deployment-listmonk.yaml index a6de008..5e4a5ec 100644 --- a/charts/listmonk/templates/deployment-listmonk.yaml +++ b/charts/listmonk/templates/deployment-listmonk.yaml @@ -19,9 +19,9 @@ spec: containers: - env: - name: LISTMONK_db__user - value: "{{ .Values.postgres.user }}" + value: {{ .Values.postgres.user }} - name: LISTMONK_db__password - value: "{{ .Values.postgres.password }}" + value: {{ .Values.postgres.password }} image: {{ .Values.listmonk.image.repository }}:{{ .Values.listmonk.image.tag | default .Chart.AppVersion }} name: listmonk volumeMounts: @@ -29,8 +29,13 @@ spec: name: config subPath: config.toml initContainers: - - name: init - image: {{ .Values.listmonk.image.repository }}:{{ .Values.listmonk.image.tag }} + - env: + - name: LISTMONK_db__user + value: {{ .Values.postgres.user }} + - name: LISTMONK_db__password + value: {{ .Values.postgres.password }} + name: init + image: {{ .Values.listmonk.image.repository }}:{{ .Values.listmonk.image.tag | default .Chart.AppVersion }} command: - ./listmonk - --install diff --git a/charts/listmonk/values.yaml b/charts/listmonk/values.yaml index 1d5a929..26b7787 100644 --- a/charts/listmonk/values.yaml +++ b/charts/listmonk/values.yaml @@ -18,7 +18,7 @@ listmonk: postgres: # -- enable postgres enabled: true - # -- when not enabled, the external postgress service hostname is required + # -- when not enabled, the external postgres service hostname is required hostname: "" # -- the postgres database name database: listmonk