mirror of
https://github.com/truenas/charts.git
synced 2026-04-09 13:48:48 +08:00
Add some extra validation on minio (#1390)
This commit is contained in:
@@ -3,7 +3,7 @@ description: High Performance, Kubernetes Native Object Storage
|
||||
annotations:
|
||||
title: MinIO
|
||||
type: application
|
||||
version: 1.0.19
|
||||
version: 1.0.20
|
||||
apiVersion: v2
|
||||
appVersion: '2023-03-24'
|
||||
kubeVersion: '>=1.16.0-0'
|
||||
|
||||
@@ -141,7 +141,7 @@ questions:
|
||||
For Multi Node Multi Drive (MNMD), the entry will look like this:</br>
|
||||
Example Entry - https://minio{1...3}.example.com:30000/data{1...4}</br></br>
|
||||
Note that each host must use the same port number and the same number of storage items.</br>
|
||||
In both cases /data{1..4} is the directories to be used for MinIO.
|
||||
In both cases /data{1...4} is the directories to be used for MinIO.
|
||||
You have to add additional storage for each data entry.
|
||||
schema:
|
||||
type: boolean
|
||||
|
||||
@@ -39,7 +39,26 @@
|
||||
{{- end -}}
|
||||
|
||||
{{- if and (ne (len .Values.minioStorage) 1) (not .Values.minioMultiMode) -}}
|
||||
{{- fail "Expected Multi Mode to be enabled, when more than 1 storage items added" -}}
|
||||
{{- fail "Expected Multi Mode to be enabled, when more than 1 storage mountPaths added" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- range $item := .Values.minioMultiMode -}}
|
||||
{{- if hasPrefix "/" $item -}}
|
||||
{{- if or (contains "{" $item) (contains "}" $item) -}}
|
||||
{{- if not (contains "..." $item) -}}
|
||||
{{- fail "Expected Multi Mode Item to have 3 dots when its a path with expansion eg [/some_path{1...4}]" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $mountPaths := list -}}
|
||||
{{- range $item := .Values.minioStorage -}}
|
||||
{{- $mountPaths = mustAppend $mountPaths $item.mountPath -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if not (deepEqual ($mountPaths) (uniq $mountPaths)) -}}
|
||||
{{- fail (printf "Expected mountPaths to be unique, but got [%v]" (join ", " $mountPaths)) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user