apiVersion: v1
kind: Service
metadata:
  name: {{ .Values.name }}
spec:
  type: ClusterIP
  selector:
    app: {{ .Values.name }}
  ports:
  {{- range .Values.ports }}
  - name: {{ .name }}
    port: {{ .value }}
    targetPort: {{ .name }}
    protocol: {{ .protocol }}
  {{- end }}
