{{- if .Values.discourse.enabled }}
apiVersion: v1
kind: Service
metadata:
  name: discourse
  labels:
    {{- include "edemocracia.labels" . | nindent 4 }}
    io.kompose.service: {{ include "edemocracia.fullname" . }}-discourse
spec:
  type: {{ .Values.discourse.service.type }}
  ports:
    - port: {{ .Values.discourse.service.port }}
      targetPort: 8080
      protocol: TCP
      name: "8080"
  selector:
    {{- include "edemocracia.selectorLabels" . | nindent 4 }}
    io.kompose.service: {{ include "edemocracia.fullname" . }}-discourse
{{- end }}