Files
chart/library/ix-dev/enterprise/minio/templates/_portal.tpl
Stavros Kois 4a896e63f3 NAS-122573 / 23.10 / minio portal fix + hostnet enabled by default (#1287)
* fix portal

* fix portal generation

* default host network to true

* require urls
2023-06-23 15:29:39 +03:00

21 lines
622 B
Smarty

{{- define "minio.portal" -}}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: portal
data:
{{- $url := urlParse .Values.minioNetwork.consoleUrl -}}
{{- $protocol := $url.scheme -}}
{{- $host := $url.hostname -}}
{{- $port := $url.host | replace $host "" | replace ":" "" -}}
{{/* If user used SCALE certificate, then force https */}}
{{- if eq "https" (include "minio.scheme" $) -}}
{{- $protocol = "https" -}}
{{- end }}
path: "/"
port: {{ $port | default .Values.minioNetwork.webPort | quote }}
protocol: {{ $protocol | default "http" }}
host: {{ $host | default "$node_ip" }}
{{- end -}}