NAS-122573 / 23.10 / minio portal fix + hostnet enabled by default (#1287)

* fix portal

* fix portal generation

* default host network to true

* require urls
This commit is contained in:
Stavros Kois
2023-06-23 15:29:39 +03:00
committed by GitHub
parent e62fb95304
commit 4a896e63f3
4 changed files with 16 additions and 11 deletions

View File

@@ -3,7 +3,7 @@ description: High Performance, Kubernetes Native Object Storage
annotations:
title: MinIO
type: application
version: 1.0.11
version: 1.0.12
apiVersion: v2
appVersion: '2023-03-24'
kubeVersion: '>=1.16.0-0'

View File

@@ -106,7 +106,7 @@ questions:
Bind to the host network. It's recommended to keep this disabled.</br>
schema:
type: boolean
default: false
default: true
- variable: certificateID
label: Certificate
description: The certificate to use for MinIO
@@ -120,17 +120,17 @@ questions:
description: |
The URL that console will use to reach API</br>
For example https;//minio1.example.com.</br></br>
This field is optional.
schema:
type: string
required: true
- variable: consoleUrl
label: MinIO Browser Redirect URL
description: |
The URL that console will provide as a redirect URL</br>
For example https;//console.example.com.</br></br>
This field is optional.
schema:
type: string
required: true
- variable: enableMultiMode
label: Enable Multi Mode (SNMD or MNMD)

View File

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

View File

@@ -25,7 +25,7 @@ minioNetwork:
apiPort: 30000
webPort: 30001
certificateID: 0
hostNetwork: false
hostNetwork: true
serverUrl: ''
consoleUrl: ''