diff --git a/.gitlab-ci/kubernetes-resources.yaml b/.gitlab-ci/kubernetes-resources.yaml index b471e93815b764105a0f18e66011cdbb69c3e0b3..69a5ebfabc11de64071e8ddc08c71eac16c4a052 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 4743a101e9f9569a145b76643953d7313c7ecd85..5120944383165d51928262352ea62e773e258cbc 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).