apiVersion: v1
kind: Service
metadata:
  name: {{ include "vmpooler.fullname" . }}-api
  labels:
    {{- include "vmpooler.labels" . | nindent 4 }}
  annotations:
    prometheus.io/scrape: {{ .Values.service.metricsEnabled | quote }}
    prometheus.io/path: '/prometheus'
spec:
  type: {{ .Values.service.type }}
  ports:
    - port: {{ .Values.service.port }}
      targetPort: {{ .Values.service.port }}
      protocol: TCP
      name: http
  clusterIP: None
  selector:
    app: {{ include "vmpooler.fullname" . }}-api
