{{- if .Values.metrics.enabled }} apiVersion: v1 kind: Service metadata: name: {{ include "freeleaps-secret-operator.fullname" . }}-metrics labels: {{- include "freeleaps-secret-operator.labels" . | nindent 4 }} spec: type: {{ .Values.metrics.service.type }} ports: - port: {{ .Values.metrics.service.port }} targetPort: metrics protocol: TCP name: metrics selector: {{- include "freeleaps-secret-operator.selectorLabels" . | nindent 4 }} {{- end }}