Compare commits
No commits in common. "7179d2568c3faf0bed06f9b5e8b8d389d6b86042" and "5d2df3db8e0cfc4e3416bf718bcf4065888b6fa5" have entirely different histories.
7179d2568c
...
5d2df3db8e
6 changed files with 0 additions and 149 deletions
|
@ -27,12 +27,6 @@ gitea:
|
||||||
server:
|
server:
|
||||||
DOMAIN: '{{{ .Env.DOMAIN_GITEA }}}'
|
DOMAIN: '{{{ .Env.DOMAIN_GITEA }}}'
|
||||||
ROOT_URL: 'https://{{{ .Env.DOMAIN_GITEA }}}:443'
|
ROOT_URL: 'https://{{{ .Env.DOMAIN_GITEA }}}:443'
|
||||||
mailer:
|
|
||||||
ENABLED: true
|
|
||||||
FROM: forgejo@{{{ .Env.DOMAIN_GITEA }}}
|
|
||||||
PROTOCOL: smtp
|
|
||||||
SMTP_ADDR: mailhog.mailhog.svc.cluster.local
|
|
||||||
SMTP_PORT: 1025
|
|
||||||
|
|
||||||
service:
|
service:
|
||||||
ssh:
|
ssh:
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
apiVersion: networking.k8s.io/v1
|
|
||||||
kind: Ingress
|
|
||||||
metadata:
|
|
||||||
name: mailhog
|
|
||||||
namespace: mailhog
|
|
||||||
spec:
|
|
||||||
ingressClassName: nginx
|
|
||||||
rules:
|
|
||||||
- host: {{{ .Env.DOMAIN }}}
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- backend:
|
|
||||||
service:
|
|
||||||
name: mailhog
|
|
||||||
port:
|
|
||||||
number: 8025
|
|
||||||
path: /mailhog
|
|
||||||
pathType: Prefix
|
|
|
@ -1,25 +0,0 @@
|
||||||
apiVersion: argoproj.io/v1alpha1
|
|
||||||
kind: Application
|
|
||||||
metadata:
|
|
||||||
name: mailhog
|
|
||||||
namespace: argocd
|
|
||||||
labels:
|
|
||||||
env: dev
|
|
||||||
finalizers:
|
|
||||||
- resources-finalizer.argocd.argoproj.io
|
|
||||||
spec:
|
|
||||||
project: default
|
|
||||||
source:
|
|
||||||
repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
|
||||||
targetRevision: HEAD
|
|
||||||
path: "stacks/ref-implementation/mailhog"
|
|
||||||
destination:
|
|
||||||
server: "https://kubernetes.default.svc"
|
|
||||||
namespace: mailhog
|
|
||||||
syncPolicy:
|
|
||||||
syncOptions:
|
|
||||||
- CreateNamespace=true
|
|
||||||
automated:
|
|
||||||
selfHeal: true
|
|
||||||
retry:
|
|
||||||
limit: -1
|
|
|
@ -1,54 +0,0 @@
|
||||||
# Mailhog
|
|
||||||
|
|
||||||
[MailHog is an email testing tool for developers](https://github.com/mailhog/MailHog).
|
|
||||||
|
|
||||||
## In cluster SMTP service
|
|
||||||
|
|
||||||
Ypu can send ESMTP emails in the cluster to `mailhog.mailhog.svc.cluster.local`, standard port `1025`, as defined in the service manifest:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: mailhog
|
|
||||||
spec:
|
|
||||||
ports:
|
|
||||||
- name: smtp
|
|
||||||
port: 1025
|
|
||||||
```
|
|
||||||
|
|
||||||
## Ingress
|
|
||||||
|
|
||||||
Mailhog offers both WebUi and API at `https://{{{ .Env.DOMAIN }}}/mailhog`.
|
|
||||||
|
|
||||||
The ingress definition is in `stacks/core/ingress-apps/mailhog.yaml` (BTW, why isn't this ingress file here in this folder ??) routing to the mailhog' service
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
spec:
|
|
||||||
rules:
|
|
||||||
- host: {{{ .Env.DOMAIN }}}
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- backend:
|
|
||||||
...
|
|
||||||
path: /mailhog
|
|
||||||
```
|
|
||||||
|
|
||||||
## API
|
|
||||||
|
|
||||||
For usage of the API see https://github.com/mailhog/MailHog/blob/master/docs/APIv2.md
|
|
||||||
|
|
||||||
## Tests
|
|
||||||
|
|
||||||
```bash
|
|
||||||
kubectl run busybox --rm -it --image=busybox -- /bin/sh
|
|
||||||
|
|
||||||
# inside bsybox
|
|
||||||
wget -O- http://mailhog.mailhog.svc.cluster.local:8025/mailhog
|
|
||||||
|
|
||||||
# check smtp port
|
|
||||||
nc -zv mailhog.mailhog.svc.cluster.local 1025
|
|
||||||
|
|
||||||
# send esmtp, first install swaks
|
|
||||||
swaks --to test@example.com --from test@example.com --server mailhog:1025 --data "Subject: Test-Mail\n\nDies ist eine Test-Mail."
|
|
||||||
```
|
|
|
@ -1,33 +0,0 @@
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: mailhog-deployment
|
|
||||||
namespace: mailhog
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: mailhog
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: mailhog
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: mailhog
|
|
||||||
image: mailhog/mailhog
|
|
||||||
env:
|
|
||||||
- name: MH_UI_WEB_PATH # set this to same value as in ingress stacks/core/ingress-apps/mailhog.yaml
|
|
||||||
value: mailhog
|
|
||||||
ports:
|
|
||||||
- containerPort: 1025
|
|
||||||
name: smtp
|
|
||||||
- containerPort: 8025
|
|
||||||
name: http
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
memory: "64Mi"
|
|
||||||
cpu: "50m"
|
|
||||||
limits:
|
|
||||||
memory: "128Mi"
|
|
||||||
cpu: "100m"
|
|
|
@ -1,13 +0,0 @@
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: mailhog
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
app: mailhog
|
|
||||||
ports:
|
|
||||||
- name: smtp
|
|
||||||
port: 1025
|
|
||||||
- name: http
|
|
||||||
port: 8025
|
|
||||||
type: ClusterIP
|
|
Reference in a new issue