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

