Files
chart/library/ix-dev/community/firefly-iii/templates/_portal.tpl
Stavros Kois 88d7198cf6 NAS-123737 / 24.04 / add firefly-iii to community train (#1485)
* add `firefly-iii` to `community` train

* initial templates

* fix path

* llint

* remove app_env

* more work

* add service

* typo

* redis service

* restart never cron

* add cap

* more cap

* more caps

* fix port

* fix few things

* more fixes

* fix cron

* another var

* typo

* update meta

* add importer port gui

* add missing keys from values

* conditionally render the importer config

* fix config
2023-08-29 23:33:31 +03:00

26 lines
659 B
Smarty

{{- define "firefly.portal" -}}
{{ $prot := "http" }}
{{ if hasPrefix "https://" .Values.fireflyConfig.appUrl }}
{{ $prot = "https" }}
{{ end }}
{{ $host := "$node_ip" }}
{{ $port := .Values.fireflyNetwork.webPort }}
{{ with .Values.fireflyConfig.appUrl }}
{{ $host = . | trimPrefix "http://" | trimPrefix "https://" | trimSuffix "/" }}
{{ if contains ":" $host }}
{{ $port = (split ":" $host)._1 }}
{{ $host = (split ":" $host)._0 }}
{{ end }}
{{ end }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: portal
data:
port: {{ $port | quote }}
path: "/"
protocol: {{ $prot }}
host: {{ $host }}
{{- end -}}