From 359d654d4adb87778d8a6cd87adfba3dda8af99f Mon Sep 17 00:00:00 2001 From: "GRUPOLKS\\m.garcia" Date: Tue, 28 Jan 2025 12:01:00 +0100 Subject: [PATCH 1/4] feat: add SMTP email mock --- charts/umbrella/Chart.yaml | 4 +-- charts/umbrella/smtp/smtp-deployment.yaml | 35 ++++++++++++++++++++++ charts/umbrella/smtp/smtp-ingress.yaml | 18 +++++++++++ charts/umbrella/smtp/smtp-service.yaml | 16 ++++++++++ charts/umbrella/values-adopter-portal.yaml | 11 ++++++- docs/user/network/README.md | 16 +++++++++- 6 files changed, 96 insertions(+), 4 deletions(-) create mode 100644 charts/umbrella/smtp/smtp-deployment.yaml create mode 100644 charts/umbrella/smtp/smtp-ingress.yaml create mode 100644 charts/umbrella/smtp/smtp-service.yaml diff --git a/charts/umbrella/Chart.yaml b/charts/umbrella/Chart.yaml index 1d56a85..7e393c7 100644 --- a/charts/umbrella/Chart.yaml +++ b/charts/umbrella/Chart.yaml @@ -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: @@ -113,4 +113,4 @@ dependencies: - name: ssi-dim-wallet-stub repository: https://eclipse-tractusx.github.io/charts/dev version: 0.1.4 - condition: ssi-dim-wallet-stub.enabled + condition: ssi-dim-wallet-stub.enabled \ No newline at end of file diff --git a/charts/umbrella/smtp/smtp-deployment.yaml b/charts/umbrella/smtp/smtp-deployment.yaml new file mode 100644 index 0000000..e535815 --- /dev/null +++ b/charts/umbrella/smtp/smtp-deployment.yaml @@ -0,0 +1,35 @@ +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 \ No newline at end of file diff --git a/charts/umbrella/smtp/smtp-ingress.yaml b/charts/umbrella/smtp/smtp-ingress.yaml new file mode 100644 index 0000000..38fdd53 --- /dev/null +++ b/charts/umbrella/smtp/smtp-ingress.yaml @@ -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 \ No newline at end of file diff --git a/charts/umbrella/smtp/smtp-service.yaml b/charts/umbrella/smtp/smtp-service.yaml new file mode 100644 index 0000000..83ffca0 --- /dev/null +++ b/charts/umbrella/smtp/smtp-service.yaml @@ -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 \ No newline at end of file diff --git a/charts/umbrella/values-adopter-portal.yaml b/charts/umbrella/values-adopter-portal.yaml index dbbfccc..4acb18b 100644 --- a/charts/umbrella/values-adopter-portal.yaml +++ b/charts/umbrella/values-adopter-portal.yaml @@ -20,6 +20,15 @@ portal: enabled: true + # -- uncomment the following for SMTP mail mock + # backend: + # mailing: + # host: "smtp4dev" + # port: "25" + # user: "portal-user" + # senderEmail: "portal-admin@lksnext.com" + # password: "portal-password" + # -- uncomment the following for persistance # postgresql: # primary: @@ -75,4 +84,4 @@ ssi-credential-issuer: # Set 'enabled' to true if onboarding is required ssi-dim-wallet-stub: - enabled: false + enabled: false \ No newline at end of file diff --git a/docs/user/network/README.md b/docs/user/network/README.md index c0d039b..375e6e6 100644 --- a/docs/user/network/README.md +++ b/docs/user/network/README.md @@ -242,12 +242,26 @@ If DNS resolution does not work, update the `/etc/hosts` (Linux/macOS) or `C:\Wi business-partners.tx.test pgadmin4.tx.test ssi-dim-wallet-stub.tx.test + smtp.tx.test ``` Replace `` 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 @@ -263,4 +277,4 @@ This work is licensed under the [CC-BY-4.0](https://creativecommons.org/licenses * SPDX-License-Identifier: CC-BY-4.0 * SPDX-FileCopyrightText: 2024 Contributors to the Eclipse Foundation -* Source URL: +* Source URL: \ No newline at end of file From 8c8820beb1564c37aa2e575686acab0fa99130dd Mon Sep 17 00:00:00 2001 From: "GRUPOLKS\\m.garcia" Date: Tue, 28 Jan 2025 12:04:22 +0100 Subject: [PATCH 2/4] fixed EOF --- charts/umbrella/Chart.yaml | 3 ++- charts/umbrella/smtp/smtp-deployment.yaml | 3 ++- charts/umbrella/smtp/smtp-ingress.yaml | 3 ++- charts/umbrella/smtp/smtp-service.yaml | 3 ++- charts/umbrella/values-adopter-portal.yaml | 3 ++- docs/user/network/README.md | 2 +- 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/charts/umbrella/Chart.yaml b/charts/umbrella/Chart.yaml index 7e393c7..904213a 100644 --- a/charts/umbrella/Chart.yaml +++ b/charts/umbrella/Chart.yaml @@ -113,4 +113,5 @@ dependencies: - name: ssi-dim-wallet-stub repository: https://eclipse-tractusx.github.io/charts/dev version: 0.1.4 - condition: ssi-dim-wallet-stub.enabled \ No newline at end of file + condition: ssi-dim-wallet-stub.enabled + \ No newline at end of file diff --git a/charts/umbrella/smtp/smtp-deployment.yaml b/charts/umbrella/smtp/smtp-deployment.yaml index e535815..f03a321 100644 --- a/charts/umbrella/smtp/smtp-deployment.yaml +++ b/charts/umbrella/smtp/smtp-deployment.yaml @@ -32,4 +32,5 @@ spec: cpu: "500m" ports: - containerPort: 80 - - containerPort: 25 \ No newline at end of file + - containerPort: 25 + \ No newline at end of file diff --git a/charts/umbrella/smtp/smtp-ingress.yaml b/charts/umbrella/smtp/smtp-ingress.yaml index 38fdd53..b256d68 100644 --- a/charts/umbrella/smtp/smtp-ingress.yaml +++ b/charts/umbrella/smtp/smtp-ingress.yaml @@ -15,4 +15,5 @@ spec: service: name: smtp4dev port: - number: 80 \ No newline at end of file + number: 80 + \ No newline at end of file diff --git a/charts/umbrella/smtp/smtp-service.yaml b/charts/umbrella/smtp/smtp-service.yaml index 83ffca0..1836f5e 100644 --- a/charts/umbrella/smtp/smtp-service.yaml +++ b/charts/umbrella/smtp/smtp-service.yaml @@ -13,4 +13,5 @@ spec: - name: http protocol: TCP port: 80 - targetPort: 80 \ No newline at end of file + targetPort: 80 + \ No newline at end of file diff --git a/charts/umbrella/values-adopter-portal.yaml b/charts/umbrella/values-adopter-portal.yaml index 4acb18b..da1abba 100644 --- a/charts/umbrella/values-adopter-portal.yaml +++ b/charts/umbrella/values-adopter-portal.yaml @@ -84,4 +84,5 @@ ssi-credential-issuer: # Set 'enabled' to true if onboarding is required ssi-dim-wallet-stub: - enabled: false \ No newline at end of file + enabled: false + \ No newline at end of file diff --git a/docs/user/network/README.md b/docs/user/network/README.md index 375e6e6..bb8f8d0 100644 --- a/docs/user/network/README.md +++ b/docs/user/network/README.md @@ -277,4 +277,4 @@ This work is licensed under the [CC-BY-4.0](https://creativecommons.org/licenses * SPDX-License-Identifier: CC-BY-4.0 * SPDX-FileCopyrightText: 2024 Contributors to the Eclipse Foundation -* Source URL: \ No newline at end of file +* Source URL: From 5ab96f7f4c1b39877ec7d6e715b4a3a77cc8bf4e Mon Sep 17 00:00:00 2001 From: "GRUPOLKS\\m.garcia" Date: Tue, 28 Jan 2025 12:21:13 +0100 Subject: [PATCH 3/4] fixed EOF V2 --- charts/umbrella/Chart.yaml | 1 - charts/umbrella/smtp/smtp-deployment.yaml | 2 +- charts/umbrella/smtp/smtp-ingress.yaml | 1 - charts/umbrella/smtp/smtp-service.yaml | 1 - charts/umbrella/values-adopter-portal.yaml | 1 - 5 files changed, 1 insertion(+), 5 deletions(-) diff --git a/charts/umbrella/Chart.yaml b/charts/umbrella/Chart.yaml index 904213a..312a118 100644 --- a/charts/umbrella/Chart.yaml +++ b/charts/umbrella/Chart.yaml @@ -114,4 +114,3 @@ dependencies: repository: https://eclipse-tractusx.github.io/charts/dev version: 0.1.4 condition: ssi-dim-wallet-stub.enabled - \ No newline at end of file diff --git a/charts/umbrella/smtp/smtp-deployment.yaml b/charts/umbrella/smtp/smtp-deployment.yaml index f03a321..788cc9c 100644 --- a/charts/umbrella/smtp/smtp-deployment.yaml +++ b/charts/umbrella/smtp/smtp-deployment.yaml @@ -33,4 +33,4 @@ spec: ports: - containerPort: 80 - containerPort: 25 - \ No newline at end of file + \ No newline at end of file diff --git a/charts/umbrella/smtp/smtp-ingress.yaml b/charts/umbrella/smtp/smtp-ingress.yaml index b256d68..420b490 100644 --- a/charts/umbrella/smtp/smtp-ingress.yaml +++ b/charts/umbrella/smtp/smtp-ingress.yaml @@ -16,4 +16,3 @@ spec: name: smtp4dev port: number: 80 - \ No newline at end of file diff --git a/charts/umbrella/smtp/smtp-service.yaml b/charts/umbrella/smtp/smtp-service.yaml index 1836f5e..9559f3b 100644 --- a/charts/umbrella/smtp/smtp-service.yaml +++ b/charts/umbrella/smtp/smtp-service.yaml @@ -14,4 +14,3 @@ spec: protocol: TCP port: 80 targetPort: 80 - \ No newline at end of file diff --git a/charts/umbrella/values-adopter-portal.yaml b/charts/umbrella/values-adopter-portal.yaml index da1abba..1d3ecd0 100644 --- a/charts/umbrella/values-adopter-portal.yaml +++ b/charts/umbrella/values-adopter-portal.yaml @@ -85,4 +85,3 @@ ssi-credential-issuer: # Set 'enabled' to true if onboarding is required ssi-dim-wallet-stub: enabled: false - \ No newline at end of file From 2b80157b7c5795b4e50a69118e21c8b0dc4be081 Mon Sep 17 00:00:00 2001 From: Mikel Garcia <122596907+mgarciaLKS@users.noreply.github.com> Date: Wed, 29 Jan 2025 14:32:42 +0100 Subject: [PATCH 4/4] Update values-adopter-portal.yaml --- charts/umbrella/values-adopter-portal.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/umbrella/values-adopter-portal.yaml b/charts/umbrella/values-adopter-portal.yaml index 1d3ecd0..818b60e 100644 --- a/charts/umbrella/values-adopter-portal.yaml +++ b/charts/umbrella/values-adopter-portal.yaml @@ -26,7 +26,7 @@ portal: # host: "smtp4dev" # port: "25" # user: "portal-user" - # senderEmail: "portal-admin@lksnext.com" + # senderEmail: "portal-admin@tx.test" # password: "portal-password" # -- uncomment the following for persistance