🧑‍💻(tilt) add mailcatcher to the stack

This allows to start a mailcatcher for local developments.
This commit is contained in:
Quentin BEY
2025-01-31 15:03:55 +01:00
committed by BEY Quentin
parent cd88799943
commit 289879962b
7 changed files with 101 additions and 0 deletions

View File

@@ -107,3 +107,12 @@ ingress:
ingressAdmin:
enabled: true
host: desk.127.0.0.1.nip.io
mailcatcher:
image:
repository: sj26/mailcatcher
tag: latest
pullPolicy: Always
ingress:
enabled: true
host: mailcatcher.127.0.0.1.nip.io

View File

@@ -100,3 +100,10 @@ releases:
values:
- env.d/{{ .Environment.Name }}/values.desk.yaml.gotmpl
- name: mailcatcher
installed: {{ regexMatch "^dev.*" .Environment.Name | toYaml }}
missingFileHandler: Warn
namespace: {{ .Namespace }}
chart: ./mailcatcher
values:
- env.d/{{ .Environment.Name }}/values.desk.yaml.gotmpl

View File

@@ -0,0 +1,5 @@
apiVersion: v2
name: mailcatcher
description: A simple SMTP server with a web interface for testing email in development
version: 1.0.0
type: application

View File

@@ -0,0 +1,25 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: mailcatcher
labels:
app: mailcatcher
spec:
replicas: 1
selector:
matchLabels:
app: mailcatcher
template:
metadata:
labels:
app: mailcatcher
spec:
containers:
- name: mailcatcher
image: "{{ .Values.mailcatcher.image.repository }}:{{ .Values.mailcatcher.image.tag }}"
imagePullPolicy: {{ .Values.mailcatcher.image.pullPolicy }}
ports:
- name: smtp
containerPort: 1025
- name: http
containerPort: 1080

View File

@@ -0,0 +1,20 @@
{{- if .Values.mailcatcher.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: mailcatcher
labels:
app: mailcatcher
spec:
rules:
- host: {{ .Values.mailcatcher.ingress.host }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: mailcatcher
port:
number: 1080
{{- end }}

View File

@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: mailcatcher
labels:
app: mailcatcher
spec:
type: ClusterIP
ports:
- port: 1025
targetPort: smtp
protocol: TCP
name: smtp
- port: 1080
targetPort: http
protocol: TCP
name: http
selector:
app: mailcatcher

View File

@@ -0,0 +1,16 @@
image:
repository: sj26/mailcatcher
tag: latest
pullPolicy: IfNotPresent
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "100m"
ingress:
enabled: false
host: ""