{{ if .Values.monitoring.metrics.enabled }} apiVersion: v1 kind: Service metadata: name: {{ include "backupRestore.fullname" . }} namespace: {{ .Release.Namespace }} labels: {{- include "backupRestore.labels" . | nindent 4 }} annotations: prometheus.io/path: /metrics prometheus.io/port: /8080 prometheus.io/scrape: "true" spec: type: ClusterIP clusterIP: None ports: - port: 8080 targetPort: 8080 protocol: TCP name: http selector: app.kubernetes.io/name: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }} {{ end }}