{{- if .Values.metrics.enabled }}
apiVersion: v1
kind: Service
metadata:
  name: {{ template "ark.fullname" . }}
  labels:
    release: {{ .Release.Name }}
    app: {{ template "ark.name" . }}
    chart: {{ template "ark.chart" . }}
    heritage: {{ .Release.Service }}
spec:
  type: ClusterIP
  ports:
    - name: monitoring
      port: 8085
      targetPort: monitoring
  selector:
    release: {{ .Release.Name }}
    app: {{ template "ark.name" . }}
{{- end }}
