{{- if .Values.lvmPlugin.metricsPort }} apiVersion: v1 kind: Service metadata: name: {{ template "lvmlocalpv.fullname" . }}-node-service labels: {{- include "lvmlocalpv.lvmNode.labels" . | nindent 4 }} spec: clusterIP: None ports: - name: metrics port: {{ .Values.lvmPlugin.metricsPort }} targetPort: {{ .Values.lvmPlugin.metricsPort }} selector: {{- with .Values.lvmNode.podLabels }} {{ toYaml . }} {{- end }} {{- end }}