{{- if and .Values.exporter.enabled .Values.exporter.svc.enabled -}} apiVersion: v1 kind: Service metadata: name: neuvector-prometheus-exporter namespace: {{ .Release.Namespace }} {{- with .Values.exporter.svc.annotations }} annotations: {{ toYaml . | nindent 4 }} {{- end }} labels: chart: {{ template "neuvector.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} app: neuvector-prometheus-exporter spec: type: {{ .Values.exporter.svc.type }} {{- if and .Values.exporter.svc.loadBalancerIP (eq .Values.exporter.svc.type "LoadBalancer") }} loadBalancerIP: {{ .Values.exporter.svc.loadBalancerIP }} {{- end }} ports: - port: 8068 name: metrics targetPort: 8068 protocol: TCP selector: app: neuvector-prometheus-exporter-pod {{- end }}