{{- if and (eq .Values.service.type "LoadBalancer") (.Values.ingress.enabled) }}
apiVersion: v1
kind: Service
metadata:
  name: {{ include "excalidraw.fullname" . }}
  labels:
    {{- include "excalidraw.labels" . | nindent 4 }}
spec:
  type: LoadBalancer
  ports:
    - port: {{ .Values.service.port }}
      targetPort: http
      protocol: TCP
      name: http
  selector:
    {{- include "excalidraw.selectorLabels" . | nindent 4 }}
{{- end }}
