|
@@ -5,11 +5,16 @@ kind: ConfigMap
|
|
|
metadata:
|
|
|
name: portal
|
|
|
data:
|
|
|
- {{- $host := .Values.minioNetwork.consoleUrl | default "$node_ip" -}}
|
|
|
- {{- $host = $host | replace "https://" "" -}}
|
|
|
- {{- $host = $host | replace "http://" "" }}
|
|
|
+ {{- $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: {{ .Values.minioNetwork.webPort | quote }}
|
|
|
- protocol: {{ include "minio.scheme" $ }}
|
|
|
- host: {{ $host }}
|
|
|
+ port: {{ $port | default .Values.minioNetwork.webPort | quote }}
|
|
|
+ protocol: {{ $protocol | default "http" }}
|
|
|
+ host: {{ $host | default "$node_ip" }}
|
|
|
{{- end -}}
|