mirror of
https://github.com/truenas/charts.git
synced 2026-05-03 18:21:45 +08:00
* init commit * add `passbolt` to `community` train * roofs * mount var run * probes * try init user * fix app url * add metadata * remove init user * add questions and revert to user 33 * plump hostnet and add hostnet values for ci * fix perms and UI
30 lines
701 B
Smarty
30 lines
701 B
Smarty
{{- define "passbolt.portal" -}}
|
|
{{- $url := urlParse .Values.passboltConfig.appUrl -}}
|
|
|
|
{{- $protocol := "http" -}}
|
|
{{- if $url.scheme -}}
|
|
{{- $protocol = $url.scheme -}}
|
|
{{- end -}}
|
|
|
|
{{- $host := "$node_ip" -}}
|
|
{{- $port := ternary "443" "80" (eq $protocol "https") -}}
|
|
{{- if $url.host -}}
|
|
{{- if contains ":" $url.host -}}
|
|
{{- $port = (split ":" $url.host)._1 -}}
|
|
{{- $host = (split ":" $url.host)._0 -}}
|
|
{{- else -}}
|
|
{{- $host = $url.host -}}
|
|
{{- end -}}
|
|
{{- end }}
|
|
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: portal
|
|
data:
|
|
path: /
|
|
port: {{ $port | quote }}
|
|
protocol: {{ $protocol | quote }}
|
|
host: {{ $host | quote }}
|
|
{{- end -}}
|