Skip to content

Conversation

LogicalGuy77
Copy link
Contributor

fixes: #6

The changes add runtime-configurable Grafana support:

The backend reads new env vars (GRAFANA_PREFIX, GRAFANA_CPU_MEMORY_DB, GRAFANA_HTTP_REQUESTS_DB) and exposes them via a new /api/config endpoint; the frontend adds a ConfigService (with APP_INITIALIZER) to load that config at startup and updates GrafanaService, ServerInfoComponent and MetricsComponent to use the runtime values with robust fallbacks and error handling.

1 2

Tested it by running models web app with:

docker run -d \
  --name models-web-app-local \
  -p 5001:5000 \
  -v ~/kubeflow-proxy-config:/root/.kube/config:ro \
  -e APP_PREFIX=/ \
  -e APP_DISABLE_AUTH=True \
  -e APP_SECURE_COOKIES=False \
  -e KUBECONFIG=/root/.kube/config \
  -e BACKEND_MODE=dev \
  -e GRAFANA_PREFIX="/custom-grafana" \
  -e GRAFANA_CPU_MEMORY_DB="db/custom-cpu-memory" \
  -e GRAFANA_HTTP_REQUESTS_DB="db/custom-http-requests" \
  models-web-app:local-dev

@Griffin-Sullivan
Copy link
Contributor

If we want to support this in a Kubeflow deployment we'll need to add it to the manifests

@Griffin-Sullivan
Copy link
Contributor

@juliusvonkohout
Copy link
Contributor

@juliusvonkohout do we need to update https://github.com/kubeflow/manifests/blob/master/applications/kserve/models-web-app/overlays/kubeflow/kustomization.yaml#L18 too?

yes, all the configuration should be exposed in kustomize with the default values.

@Griffin-Sullivan
Copy link
Contributor

After we merge we need to update the website to include the environment variables. See table in https://www.kubeflow.org/docs/components/kserve/webapp/#install-standalone

@juliusvonkohout
Copy link
Contributor

Please ping me when you need a merge

Copy link
Contributor

@Griffin-Sullivan Griffin-Sullivan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juliusvonkohout looks good to me

Signed-off-by: Julius von Kohout <[email protected]>
Signed-off-by: Julius von Kohout <[email protected]>
Signed-off-by: Julius von Kohout <[email protected]>
Signed-off-by: Julius von Kohout <[email protected]>
@juliusvonkohout juliusvonkohout merged commit a3e7525 into kserve:master Sep 29, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configurable grafana endpoint in web app
3 participants