apiVersion: v1
kind: Service
metadata:
  name: {{ .Release.Name }}-{{ .Values.backend.name }}
  namespace: {{ .Values.global.namespace }}
  labels:
    app: {{ .Release.Name }}-{{ .Values.backend.name }}
    component: backend
spec:
  type: {{ .Values.backend.service.type }}
  ports:
    - port: {{ .Values.backend.service.port }}
      targetPort: {{ .Values.backend.service.targetPort }}
      protocol: TCP
      name: http
  selector:
    app: {{ .Release.Name }}-{{ .Values.backend.name }}
