mirror of
https://github.com/truenas/charts.git
synced 2026-06-14 22:25:57 +08:00
Add ability to run minio in distributed mode
This commit is contained in:
@@ -60,6 +60,28 @@ questions:
|
||||
- value: "Recreate"
|
||||
description: "Kill existing pods before creating new ones"
|
||||
|
||||
- variable: distributedMode
|
||||
label: "Enable Distributed Mode"
|
||||
group: "Minio Configuration"
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
show_subquestions_if: true
|
||||
subquestions:
|
||||
- variable: distributedIps
|
||||
label: "Distributed Minio URI(s)"
|
||||
schema:
|
||||
type: list
|
||||
required: true
|
||||
default: []
|
||||
items:
|
||||
- variable: ip
|
||||
label: "Distributed Minio URI"
|
||||
schema:
|
||||
type: string
|
||||
empty: false
|
||||
|
||||
|
||||
- variable: extraArgs
|
||||
label: "Minio Extra Arguments"
|
||||
group: "Minio Configuration"
|
||||
|
||||
@@ -50,3 +50,16 @@ Retrieve scheme/protocol for minio
|
||||
{{- print "http" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{/*
|
||||
Retrieve command for minio application
|
||||
*/}}
|
||||
{{- define "minio.commandArgs" -}}
|
||||
{{- $arg := "/usr/bin/docker-entrypoint.sh minio -S /etc/minio/certs server --console-address=':9001'" -}}
|
||||
{{- if .Values.distributedMode -}}
|
||||
{{- printf "%s %s" $arg ((concat (.Values.distributedIps | default list) (.Values.extraArgs | default list)) | join " ") -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s %s" $arg ((concat (list "/export") (.Values.extraArgs | default list)) | join " ") -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -33,7 +33,7 @@ spec:
|
||||
command:
|
||||
- "/bin/sh"
|
||||
- "-ce"
|
||||
- "/usr/bin/docker-entrypoint.sh minio -S /etc/minio/certs server /export --console-address=':9001' {{ (.Values.extraArgs | default list) | join " " }}"
|
||||
- {{ include "minio.commandArgs" . }}
|
||||
ports:
|
||||
- name: api
|
||||
containerPort: 9000
|
||||
|
||||
@@ -16,3 +16,5 @@ service:
|
||||
consolePort: 32325
|
||||
nodePort: 32324
|
||||
updateStrategy: RollingUpdate
|
||||
distributedMode: false
|
||||
distributedIps: []
|
||||
|
||||
Reference in New Issue
Block a user