{{- $architecture := coalesce .Values.mode .Values.architecture }}
{{- if eq $architecture "distributed" }}
apiVersion: v1
kind: Service
metadata:
  name: {{ printf "%s-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
  namespace: {{ include "common.names.namespace" . | quote }}
  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 }}
