{{- if eq .Values.mode "distributed" }}
apiVersion: v1
kind: Service
metadata:
  name: {{ include "minio.fullname" . }}-headless
  namespace: {{ .Release.Namespace }}
  labels: {{- include "minio.labels" . | nindent 4 }}
spec:
  type: ClusterIP
  clusterIP: None
  ports:
    - name: minio
      port: {{ .Values.service.port }}
      targetPort: minio
  selector: {{- include "minio.matchLabels" . | nindent 4 }}
{{- end }}
