# grafana_charts_admin-api-svc.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ template "enterprise-metrics.fullname" . }}-admin-api
  labels:
    app: {{ template "enterprise-metrics.name" . }}-admin-api
    chart: {{ template "enterprise-metrics.chart" . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
    {{- with .Values.admin_api.labels }}
    {{- toYaml . | nindent 4 }}
    {{- end }}
  annotations:
    {{- toYaml .Values.admin_api.annotations | nindent 4 }}
spec:
  type: ClusterIP
  ports:
    - port: {{ .Values.config.server.http_listen_port }}
      protocol: TCP
      name: http-metrics
      targetPort: http-metrics
    - port: {{ .Values.config.server.grpc_listen_port }}
      protocol: TCP
      name: grpc
      targetPort: grpc
  selector:
    app: {{ template "enterprise-metrics.name" . }}-admin-api
    release: {{ .Release.Name }}