From 43d4514bc6ab00285affdeeb69ee52793f076cc8 Mon Sep 17 00:00:00 2001 From: Christopher Hase Date: Mon, 14 Apr 2025 13:23:02 +0200 Subject: [PATCH] add http-server part 8.5 --- README.md | 5 +-- backend-ingress.yaml | 22 ------------- deployment.yaml | 77 +++++++++++++++++++++++++++++++++++++++++++ frontend-ingress.yaml | 24 -------------- frontend/index.html | 2 +- service.yaml | 15 --------- 6 files changed, 81 insertions(+), 64 deletions(-) delete mode 100644 backend-ingress.yaml delete mode 100644 frontend-ingress.yaml delete mode 100644 service.yaml diff --git a/README.md b/README.md index dc4e0b6..6db6456 100644 --- a/README.md +++ b/README.md @@ -19,11 +19,10 @@ It is also possible to configure the intervall of days between the sending of ho The app can be deployed by running: ```bash -$ kubectl apply -f ingress.yaml -$ kubectl apply -f service.yaml $ kubectl apply -f deployment.yaml ``` +This will start the deployment of the app in the pod, the service and an ingress for the HTTP frontend server and an ingress for the backend server. When a pod with the app is initally started, one email will be sent to the configured receiver. ## Backend Server @@ -32,10 +31,12 @@ The backend server is running inside the pod on the address http://localhost:809 An E-Mail with an I-Ching horoscope (provided by the library app) will be sent to the configured email address. The backend server can be tested from inside the pod by calling 'curl -X POST http://localhost:8090/iching/api/command' from the console. +The backend server has a separate ingress, so API requests can get forwarded to the backend. Also the backend does not need 'rewrite target'. ## HTTP Server The frontend server is running inside the pod on the address http://localhost:8080/iching. It provides an HTML homepage with a button. Upon pressing the button, the backend server will be called (to send an E-Mail). +The frontend server has a separate ingress from the backend server, since the frontend server needs the 'rewrite target' annotation: So the Frontend is not running in the root folder but using the sub-path 'iching'.