mirror of
https://github.com/truenas/charts.git
synced 2026-11-22 07:13:25 +00:00
* Add gitea to community train - initial commit * finishup * hide whole group * adjust to new common fixes (needs new tgz) * bump commmon * add descripnts and bump common
22 lines
628 B
Smarty
22 lines
628 B
Smarty
{{- define "gitea.portal" -}}
|
|
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: portal
|
|
data:
|
|
path: /
|
|
port: {{ .Values.giteaNetwork.webPort | quote }}
|
|
{{ if or (hasPrefix "https://" .Values.giteaNetwork.rootURL) .Values.giteaNetwork.certificateID }}
|
|
protocol: https
|
|
{{ else }}
|
|
protocol: http
|
|
{{ end }}
|
|
{{- $host := "$node_ip" -}}
|
|
{{ with .Values.giteaNetwork.rootURL }} {{/* Trim protocol and trailing slash */}}
|
|
{{ $host = (. | trimPrefix "https://" | trimPrefix "http://" | trimSuffix "/") }}
|
|
{{ $host = mustRegexReplaceAll "(.*):[0-9]+" $host "${1}" }}
|
|
{{ end }}
|
|
host: {{ $host }}
|
|
{{- end -}}
|