From d7a1d784d3cc286a755e34a119f2223c39a673db Mon Sep 17 00:00:00 2001 From: Derek Wang Date: Fri, 1 Dec 2023 15:21:25 -0800 Subject: [PATCH] docs: access path config (#1401) Signed-off-by: Derek Wang --- docs/operations/ui-access-path.md | 58 +++++++------------------------ 1 file changed, 12 insertions(+), 46 deletions(-) diff --git a/docs/operations/ui-access-path.md b/docs/operations/ui-access-path.md index 31b100cfb1..7010f0d8fb 100644 --- a/docs/operations/ui-access-path.md +++ b/docs/operations/ui-access-path.md @@ -1,51 +1,17 @@ # UI Access Path -Currently, the base configuration will host the UI at the root `/` ie. `localhost:8443`. If a user needs to access the UI under a different path for a certain cluster, this can be achieved -with this configuration. +By default, Numaflow UI server will host the service at the root `/` ie. `localhost:8443`. If a user needs to access the UI server under a different path, this can be achieved with following configuration. This is useful when the UI is hosted behind a reverse proxy or ingress controller that requires a specific path. -This can be configured in the `numaflow-server` deployment spec by adding the `--base-href` argument to the main and init containers. This will route requests from the root to the new -preferred destination. - -For example, we could port-forward the service and host at `localhost:8443/numaflow`. Note that this new access path will work with or without a trailing slash. - -The following example shows how to configure the access path for the UI to `/numaflow`: +Configure `server.base.href` in the ConfigMap `numaflow-cmd-params-config`. ```yaml -spec: - serviceAccountName: numaflow-server-sa - securityContext: - runAsNonRoot: true - runAsUser: 9737 - volumes: - - name: env-volume - emptyDir: {} - initContainers: - - name: server-init - image: quay.io/numaproj/numaflow:latest - args: - - "server-init" - - --base-href=/numaflow # include new path here - imagePullPolicy: Always - volumeMounts: - - mountPath: /opt/numaflow - name: env-volume - containers: - - name: main - image: quay.io/numaproj/numaflow:latest - args: - - "server" - - --base-href=/numaflow # include new path here - imagePullPolicy: Always - volumeMounts: - - mountPath: /ui/build/runtime-env.js - name: env-volume - subPath: runtime-env.js - - mountPath: /ui/build/index.html - name: env-volume - subPath: index.html - env: - - name: NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace -``` \ No newline at end of file +apiVersion: v1 +kind: ConfigMap +metadata: + name: numaflow-cmd-params-config +data: + ### Base href for Numaflow UI server, defaults to '/'. + server.base.href: "/app" +``` + +The configuration above will host the service at `localhost:8443/app`. Note that this new access path will work with or without a trailing slash.