Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions mailu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ Check that the deployed pods are all running.
| `ingress.annotations` | Annotations for the ingress resource, if enabled. Useful e.g. for configuring the NGINX controller configuration. | `nginx.ingress.kubernetes.io/proxy-body-size: "0"` |
| `ingress.realIpHeader` | Header from http(s) ingress that contains the real client IP | `X-Forwarded-For` |
| `ingress.realIpFrom` | IP/Network from where `realIpHeader` is accepted | `0.0.0.0/0` |
| `ingress.traefikCRD.enabled` | Enable the traefik for the proxy | `false` |
| `ingress.traefikCRD.entryPoints` | Entrypoints configuration in the ingress route | `[]` |
| `ingress.traefikCRD.priority` | Override default calcul for the ingress route priority | not set |
| `roundcube.enabled` | enable roundcube webmail | `true` |
| `clamav.enabled` | enable clamav antivirus | `true` |
| `dovecot.overrides` | enable dovecot overrides | not set |
Expand Down
33 changes: 33 additions & 0 deletions mailu/templates/ingress-route.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{{- $fullname := (include "mailu.fullname" .) }}
{{ if and .Values.ingress.externalIngress .Values.ingress.traefikCRD.enabled }}
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: {{ $fullname }}
{{- if .Values.ingress.annotations }}
annotations:
{{ toYaml .Values.ingress.annotations | indent 4 }}
{{- end }}
labels:
app: {{ $fullname }}
component: admin
spec:
entryPoints:
{{- range .Values.ingress.traefikCRD.entryPoints }}
- "{{.}}"
{{- end }}
tls:
secretName: {{ $fullname }}-certificates
routes:
- kind: Rule
match: >-
{{- range $index, $hostname := .Values.hostnames }}
{{ if $index }}|| {{ end }}Host(`{{ $hostname }}`)
{{- end }}
{{- if .Values.ingress.traefikCRD.priority }}
priority: {{ .Values.ingress.traefikCRD.priority }}
{{- end }}
services:
- name: {{ $fullname }}-front
port: 80
{{ end }}
2 changes: 1 addition & 1 deletion mailu/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is derived from https://github.com/Mailu/Mailu/blob/master/docs/kubernetes/mailu/admin-ingress.yaml

{{- $fullname := (include "mailu.fullname" .) }}
{{ if .Values.ingress.externalIngress }}
{{ if and .Values.ingress.externalIngress (not .Values.ingress.traefikCRD.enabled) }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
Expand Down
3 changes: 3 additions & 0 deletions mailu/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ certmanager:
# Set ingress and loadbalancer config
ingress:
externalIngress: true
traefikCRD:
enabled: false
entryPoints: []
tlsFlavor: cert
className: ""
annotations:
Expand Down