{{- if .Values.apic_exporters.enabled }}
{{- if .Values.apic_exporters.exporter_types }}
{{ $global_values := .Values }}
apiVersion: v1
kind: Service
metadata:
  name: apic-exporters
  namespace: infra-monitoring
  labels:
    servcie: metrics
    system: openstack
    component: apic-exporters
  annotations:
    {{- range $exporter_type_values := .Values.apic_exporters.exporter_types }}
    {{- range $collector := $exporter_type_values.collector }}
    {{- if eq $collector "maia" }}
    maia.io/scrape: "true"
    maia.io/port: {{ $global_values.apic_exporters.prometheus_port | quote }}
    {{- end }}
    {{- if eq $collector "prometheus" }}
    prometheus.io/scrape: "true"
    prometheus.io/port: {{ $global_values.apic_exporters.prometheus_port | quote}}
    prometheus.io/target: "openstack"
    {{- end }}
    {{- end }}
    {{- end }}
spec:
  selector:
    component: apic-exporters
  ports:
  - name: metrics
    port: {{ $global_values.apic_exporters.prometheus_port }}
{{- end }}
{{- end }}
{{- if .Values.apic_exporters.enabled }}
{{- if .Values.apic_exporters.exporter_types }}
{{ $global_values := .Values }}
apiVersion: v1
kind: Service
metadata:
  name: apic-exporters
  namespace: infra-monitoring
  labels:
    servcie: metrics
    system: openstack
    component: apic-exporters
  annotations:
    {{- range $exporter_type_values := .Values.apic_exporters.exporter_types }}
    {{- range $collector := $exporter_type_values.collector }}
    {{- if eq $collector "maia" }}
    maia.io/scrape: "true"
    maia.io/port: {{ $global_values.apic_exporters.prometheus_port | quote }}
    {{- end }}
    {{- if eq $collector "prometheus" }}
    prometheus.io/scrape: "true"
    prometheus.io/port: {{ $global_values.apic_exporters.prometheus_port | quote}}
    prometheus.io/targets: "openstack"
    {{- end }}
    {{- end }}
    {{- end }}
spec:
  selector:
    component: apic-exporters
  ports:
  - name: metrics
    port: {{ $global_values.apic_exporters.prometheus_port }}
{{- end }}
{{- end }}
Fix typo for apic-exporters prometheus scrape
Fix typo for apic-exporters prometheus scrape
