apiVersion: v1
kind: Service
metadata:
  name: {{ include "hlf-ord.fullname" . }}
  labels:
{{ include "labels.standard" . | indent 4 }}
spec:
  type: {{ .Values.service.type }}
  ports:
    - port: {{ .Values.service.port }}
      targetPort: 7050
      protocol: TCP
      name: grpc
    {{- if eq .Values.ord.metrics.provider "prometheus" }}
    - port: {{ .Values.service.portMetrics }}
      targetPort: 9443
      protocol: TCP
      name: metrics
    {{- end }}
  selector:
    app: {{ include "hlf-ord.name" . }}
    release: {{ .Release.Name }}
