mirror of
https://github.com/truenas/charts.git
synced 2026-11-06 07:29:16 +08:00
Enable host networking when minio distributed mode is on
This commit is contained in:
@@ -58,8 +58,20 @@ 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 " ") -}}
|
||||
{{- cat $arg (join " " (concat (.Values.distributedIps | default list) (.Values.extraArgs | default list))) -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s %s" $arg ((concat (list "/export") (.Values.extraArgs | default list)) | join " ") -}}
|
||||
{{- cat $arg ((concat (list "/export") (.Values.extraArgs | default list)) | join " ") -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{/*
|
||||
Enable host networking
|
||||
*/}}
|
||||
{{- define "minio.hostNetworking" -}}
|
||||
{{- if .Values.distributedMode -}}
|
||||
{{- print "true" -}}
|
||||
{{- else -}}
|
||||
{{- print "false" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -7,6 +7,8 @@ metadata:
|
||||
chart: {{ template "common.names.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
annotations:
|
||||
rollme: {{ randAlphaNum 5 | quote }}
|
||||
spec:
|
||||
replicas: {{ (default 1 .Values.replicas) }}
|
||||
strategy:
|
||||
@@ -25,6 +27,7 @@ spec:
|
||||
annotations: {{ include "common.annotations" . | nindent 8 }}
|
||||
spec:
|
||||
serviceAccountName: {{ include "common.names.serviceAccountName" . | quote }}
|
||||
hostNetwork: {{ include "minio.hostNetworking" . }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
{{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
|
||||
|
||||
@@ -18,4 +18,4 @@ service:
|
||||
updateStrategy: RollingUpdate
|
||||
distributedMode: false
|
||||
distributedIps: []
|
||||
extraAppVolumeMounts: []
|
||||
extraAppVolumeMounts: []
|
||||
|
||||
Reference in New Issue
Block a user