Files
charts/library/ix-dev/community/gitea/templates/_portal.tpl
T
Stavros Kois 58118d56cb NAS-121235 / 23.10 / Add gitea to community train (#1065)
* 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
2023-04-12 10:06:06 +03:00

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