Commit 0f8c3fba authored by sonicaj's avatar sonicaj

Enable host networking when minio distributed mode is on

parent bce2e26c
...@@ -58,8 +58,20 @@ Retrieve command for minio application ...@@ -58,8 +58,20 @@ Retrieve command for minio application
{{- define "minio.commandArgs" -}} {{- define "minio.commandArgs" -}}
{{- $arg := "/usr/bin/docker-entrypoint.sh minio -S /etc/minio/certs server --console-address=':9001'" -}} {{- $arg := "/usr/bin/docker-entrypoint.sh minio -S /etc/minio/certs server --console-address=':9001'" -}}
{{- if .Values.distributedMode -}} {{- 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 -}} {{- 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 -}}
{{- end -}} {{- end -}}
...@@ -7,6 +7,8 @@ metadata: ...@@ -7,6 +7,8 @@ metadata:
chart: {{ template "common.names.chart" . }} chart: {{ template "common.names.chart" . }}
release: {{ .Release.Name }} release: {{ .Release.Name }}
heritage: {{ .Release.Service }} heritage: {{ .Release.Service }}
annotations:
rollme: {{ randAlphaNum 5 | quote }}
spec: spec:
replicas: {{ (default 1 .Values.replicas) }} replicas: {{ (default 1 .Values.replicas) }}
strategy: strategy:
...@@ -25,6 +27,7 @@ spec: ...@@ -25,6 +27,7 @@ spec:
annotations: {{ include "common.annotations" . | nindent 8 }} annotations: {{ include "common.annotations" . | nindent 8 }}
spec: spec:
serviceAccountName: {{ include "common.names.serviceAccountName" . | quote }} serviceAccountName: {{ include "common.names.serviceAccountName" . | quote }}
hostNetwork: {{ include "minio.hostNetworking" . }}
containers: containers:
- name: {{ .Chart.Name }} - name: {{ .Chart.Name }}
{{ include "common.containers.imageConfig" .Values.image | nindent 10 }} {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
......
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