kind: Service
apiVersion: v1

metadata:
  name: glance
  labels:
    app: {{ template "name" . }}
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
    component: glance
    type: api
{{- if .Values.metrics.enabled }}
  annotations:
    prometheus.io/scrape: "true"
    prometheus.io/targets: {{ required ".Values.alerts.prometheus missing" .Values.alerts.prometheus | quote }}
{{- end }}
spec:
  selector:
    app: {{ template "name" . }}
  type: {{ default "ClusterIP" .Values.services.type | quote }}
  ports:
    - name: public
      port: {{ .Values.api_port_internal }}
      targetPort: 9292
{{- if .Values.services.externalip }}
  externalIPs: [
    {{ .Values.services.externalip | quote }}
    ]
{{- end }}

kind: Service
apiVersion: v1

metadata:
  name: glance
  labels:
    app: {{ template "name" . }}
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
    component: glance
    type: api
{{- if .Values.metrics.enabled }}
  annotations:
    prometheus.io/scrape: "true"
    prometheus.io/port: "{{.Values.metrics.port}}"
    prometheus.io/targets: {{ required ".Values.alerts.prometheus missing" .Values.alerts.prometheus | quote }}
{{- end }}
spec:
  selector:
    app: {{ template "name" . }}
  type: {{ default "ClusterIP" .Values.services.type | quote }}
  ports:
    - name: public
      port: {{ .Values.api_port_internal }}
      targetPort: 9292
{{- if .Values.services.externalip }}
  externalIPs: [
    {{ .Values.services.externalip | quote }}
    ]
{{- end }}

Revert "[Glance] prevent double scraping of api"
Revert "[Glance] prevent double scraping of api"

This reverts commit 3cdf6875b9098e0b8f30a7f48d475ef3d7267731.
