apiVersion: v1
kind: Service
metadata:
  name: {{ include "langflow.fullname" . }}
  labels:
    app: {{ template "langflow.name" . }}
    chart: {{ template "langflow.chart" . }}
    release: {{ .Release.Name }}
spec:
  type: {{ .Values.langflow.frontend.service.type }}
  ports:
    - port: {{ .Values.langflow.frontend.service.port }}
      targetPort: http
      protocol: TCP
      name: http
  selector:
    app: {{ template "langflow.name" . }}
    chart: {{ template "langflow.chart" . }}
    release: {{ .Release.Name }}
    langflow-scope: "frontend"
---
apiVersion: v1
kind: Service
metadata:
  name: {{ include "langflow.fullname" . }}-backend
  labels:
    app: {{ template "langflow.name" . }}
    chart: {{ template "langflow.chart" . }}
    release: {{ .Release.Name }}
spec:
  type: {{ .Values.langflow.backend.service.type }}
  ports:
    - port: {{ .Values.langflow.backend.service.port }}
      targetPort: http
      protocol: TCP
      name: http
  selector:
    app: {{ template "langflow.name" . }}
    chart: {{ template "langflow.chart" . }}
    release: {{ .Release.Name }}
    langflow-scope: "backend"
