Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add SMTP mock email server #203

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion charts/umbrella/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ sources:
- https://github.com/eclipse-tractusx/tractus-x-umbrella

type: application
version: 2.1.0
version: 2.2.0

# when adding or updating versions of dependencies, also update list under /docs/user/installation/README.md
dependencies:
Expand Down
36 changes: 36 additions & 0 deletions charts/umbrella/smtp/smtp-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: smtp4dev
labels:
app: smtp4dev
spec:
replicas: 1
selector:
matchLabels:
app: smtp4dev
template:
metadata:
labels:
app: smtp4dev
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/os
operator: In
values:
- linux
containers:
- name: smtp4dev
image: rnwood/smtp4dev:3.6.1
resources:
limits:
memory: "512Mi"
cpu: "500m"
ports:
- containerPort: 80
- containerPort: 25

18 changes: 18 additions & 0 deletions charts/umbrella/smtp/smtp-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: smtp4dev-ingress
labels:
name: smtp4dev-ingress
spec:
rules:
- host: smtp.tx.test
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: smtp4dev
port:
number: 80
16 changes: 16 additions & 0 deletions charts/umbrella/smtp/smtp-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: smtp4dev
spec:
selector:
app: smtp4dev
ports:
- name: smtp
protocol: TCP
port: 25
targetPort: 25
- name: http
protocol: TCP
port: 80
targetPort: 80
9 changes: 9 additions & 0 deletions charts/umbrella/values-adopter-portal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@

portal:
enabled: true
# -- uncomment the following for SMTP mail mock
# backend:
# mailing:
# host: "smtp4dev"
# port: "25"
# user: "portal-user"
# senderEmail: "[email protected]"
# password: "portal-password"

# -- uncomment the following for persistance
# postgresql:
# primary:
Expand Down
14 changes: 14 additions & 0 deletions docs/user/network/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,26 @@ If DNS resolution does not work, update the `/etc/hosts` (Linux/macOS) or `C:\Wi
<MINIKUBE_IP> business-partners.tx.test
<MINIKUBE_IP> pgadmin4.tx.test
<MINIKUBE_IP> ssi-dim-wallet-stub.tx.test
<MINIKUBE_IP> smtp.tx.test
```

Replace `<MINIKUBE_IP>` with the output of the following command:
```bash
minikube ip
```
## Configure the SMTP server

Once we have the cluster deployed, before launching the data space, it is first necessary to launch the local SMTP server.

### Apply the files to your kubernetes cluster

```shell
kubectl apply -f ./charts/umbrella/smtp/smtp-deployment.yaml -n umbrella
kubectl apply -f ./charts/umbrella/smtp/smtp-service.yaml -n umbrella
kubectl apply -f ./charts/umbrella/smtp/smtp-ingress.yaml -n umbrella
```

You can now access your SMTP server using this hostname: [smtp.tx.test](http://smtp.tx.test)

## Verify Network Setup

Expand Down
Loading