Commit b4b36c65 authored by sonicaj's avatar sonicaj

Add ability to run minio in distributed mode

parent 999d80fe
......@@ -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: []
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment