{{- if .Values.dataintegration.enabled }}
{{- if .Values.dataintegration.config.metrics.enabled }}
---
apiVersion: v1
kind: Service
metadata:
  name: {{ include "cmem.servicename-di" . }}-metrics
  labels:
    {{- include "cmem.labels-di" . | nindent 4 }}
    app: di-metrics
spec:
  type: {{ .Values.dataintegration.service.type }}
  ports:
    - port: {{ .Values.dataintegration.config.metrics.port }}
      targetPort: {{ .Values.dataintegration.config.metrics.port }}
      protocol: TCP
      name: http
  selector:
    {{- include "cmem.selectorLabels-di" . | nindent 4 }}
{{ end -}}
{{ end -}}
