authelia/internal/suites/example/kube/mail/mail.yml

81 lines
1.6 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mailpit
namespace: authelia
labels:
app: mailpit
spec:
replicas: 1
selector:
matchLabels:
app: mailpit
template:
metadata:
labels:
app: mailpit
spec:
containers:
- name: mailpit
image: axllent/mailpit
ports:
- containerPort: 1025
- containerPort: 8025
volumeMounts:
- name: authelia-ssl
mountPath: /pki
readOnly: true
env:
- name: MP_SMTP_TLS_CERT
value: /pki/public.crt
- name: MP_SMTP_TLS_KEY
value: /pki/private.pem
- name: MP_SMTP_AUTH
value: authelia:mailer
volumes:
- name: authelia-ssl
hostPath:
path: /configmaps/authelia/ssl
type: Directory
...
---
apiVersion: v1
kind: Service
metadata:
name: mailpit-service
namespace: authelia
spec:
selector:
app: mailpit
ports:
- protocol: TCP
port: 8025
name: ui
- protocol: TCP
port: 1025
name: smtp
...
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: mailpit-ingress
namespace: authelia
annotations:
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/router.entrypoints: websecure
spec:
rules:
- host: mail.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: mailpit-service
port:
number: 8025
...