apiVersion: v1
kind: Service
metadata:
  name: {{ include "danswer-stack.fullname" . }}-webserver
  labels:
    {{- include "danswer-stack.labels" . | nindent 4 }}
    {{- if .Values.webserver.deploymentLabels }}
    {{- toYaml .Values.webserver.deploymentLabels | nindent 4 }}
    {{- end }}
spec:
  type: {{ .Values.webserver.service.type }}
  ports:
    - port: {{ .Values.webserver.service.port }}
      targetPort: http
      protocol: TCP
      name: http
  selector:
    {{- include "danswer-stack.selectorLabels" . | nindent 4 }}
    {{- if .Values.webserver.deploymentLabels }}
    {{- toYaml .Values.webserver.deploymentLabels | nindent 4 }}
    {{- end }}
