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