{{- if eq .Values.mode "distributed" }}
apiVersion: v1
kind: Service
metadata:
  name: {{ include "common.names.fullname" . }}-headless
  labels: {{- include "common.labels.standard" . | nindent 4 }}
    app.kubernetes.io/component: worker
spec:
  type: ClusterIP
  clusterIP: None
  selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
    app.kubernetes.io/component: worker
{{- end }}
