From 9d448077fe135a3ee4b511fd7c3a042718c1d25a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20B=C3=A4ume?= <julian.baeume@open-xchange.com> Date: Tue, 19 Oct 2021 11:02:57 +0200 Subject: [PATCH] add some documentation to the readme file describe a little better what this service is supposed to do and how it plays along the other parts of the stack. --- .gitlab-ci/kubernetes-resources.yaml | 4 ++-- README.md | 18 ++++++++++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci/kubernetes-resources.yaml b/.gitlab-ci/kubernetes-resources.yaml index b471e93..69a5ebf 100644 --- a/.gitlab-ci/kubernetes-resources.yaml +++ b/.gitlab-ci/kubernetes-resources.yaml @@ -22,14 +22,14 @@ spec: http: paths: - path: / - pathType: ImplementationSpecific + pathType: Prefix backend: service: name: ${OX_COMPONENT} port: name: http - path: /api/ - pathType: ImplementationSpecific + pathType: Prefix backend: service: name: ${OX_COMPONENT}-mw-http-api diff --git a/README.md b/README.md index 4743a10..5120944 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,14 @@ # manifest-service -> Provides the collected manifest.json of services in a cluster +> Provides the collected manifest.json of services in a cluster as well as a list of dependencies +> for each source file. This information can be used to dynamically compile all ui components at +> runtime in the browser. Besides serving the information about all resources, this service can +> also function to provide snapshots of all the resources available at a specific point in time. ## Endpoint -- `/api/manifest.json` +- `/manifests` +- `/dependencies` ## Deployments @@ -27,6 +31,8 @@ cd helm helm upgrade -i -f manifest-service/values.yaml -f values/develop.yaml manifest-service ./manifest-service ``` +It is possible to horizontally scale the manifest service, as more clients are fetching resources from this service. Each instance maintains a cache of all files locally (in memory), allowing to scale easily. + ## Configuration **local, docker** @@ -44,3 +50,11 @@ helm upgrade -i -f manifest-service/values.yaml -f values/develop.yaml manifest- | `port` | Exposed port | `"8080"` | | `cacheTTL` | Vite manifest caching time | `30000` | | `logLevel` | Pino log level | `"info"` | + +## Ingress + +When using Ingress to make the service available to the public, the service is intended to be +configured as a "fallback" or "default" service to answer all requests that are not specified +to be served by one of the other services (e.g like everything under /api). This should simplify +the Ingress configuration. One example can be found +[in the manifest-service repository](https://gitlab.open-xchange.com/frontend/Infrastructure/manifest-service/-/blob/main/.gitlab-ci/kubernetes-resources.yaml). -- GitLab