From 9cd4680e707c57d06e718f8d1e6f524408965a32 Mon Sep 17 00:00:00 2001 From: perf3ct Date: Tue, 10 Oct 2023 15:37:44 -0700 Subject: [PATCH] have frontendUrl use Ingress host if exists --- templates/api.yaml | 13 +++++++++++++ values.yaml | 10 ++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/templates/api.yaml b/templates/api.yaml index c997a43..4ac7ee2 100644 --- a/templates/api.yaml +++ b/templates/api.yaml @@ -38,6 +38,19 @@ probes: startup: enabled: false +{{ if .Values.frontend.ingress.enabled }} +configMaps: + # The configuration for Vikunja's backend. + # https://vikunja.io/docs/config-options/ + config: + enabled: true + data: + config.yml: + service: + # Vikunja needs to know the frontend URL for password reset emails. + frontendUrl: "http://{{ index .Values.frontend.ingress.main.hosts 0 "host" }}{{ index .Values.frontend.ingress.main.hosts 0 "path" }}" +{{ end }} + env: {{ if .Values.redis.enabled }} VIKUNJA_REDIS_ENABLED: "true" diff --git a/values.yaml b/values.yaml index 3c4911d..3ae9f5a 100644 --- a/values.yaml +++ b/values.yaml @@ -17,7 +17,7 @@ storage: ###################### # VIKUNJA COMPONENTS # ###################### -# You can find the default values +# You can find the default values that this `values.yaml` overrides, in the comment at the top of this file. api: enabled: true image: @@ -48,6 +48,11 @@ api: enabled: true data: config.yml: + # Vikunja needs to know the frontend URL for password reset emails. + # So you might need to provide its value, if you're not using an ingress. + # service: + # frontendUrl: http://vikunja.local + database: # You should provide your own secret outside of this helm-chart and use `postgresql.global.postgresql.auth.existingSecret` to provide credentials to the postgresql instance (https://github.com/bitnami/charts/blob/5ff8ad5f3c754e3c2423d6abf46f522e8abe0410/bitnami/postgresql/values.yaml#L35-L39) type: 'postgres' @@ -55,9 +60,6 @@ api: password: "{{ .Values.postgresql.global.postgresql.auth.password }}" database: "{{ .Values.postgresql.global.postgresql.auth.database }}" host: '{{ .Release.Name }}-postgresql' - service: - # Vikunja needs to know the frontend URL for password reset emails. - frontendUrl: http://vikunja.local typesense: # Typesense will only work if it is enabled below (typesense.enabled). url: '{{ printf "%s-typesense" .Release.Name }}'