have frontendUrl use Ingress host if exists

This commit is contained in:
perf3ct 2023-10-10 15:37:44 -07:00
parent 61b8892ff0
commit 9cd4680e70
No known key found for this signature in database
GPG Key ID: 569C4EEC436F5232
2 changed files with 19 additions and 4 deletions

View File

@ -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"

View File

@ -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 }}'