Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

yossiovadia
Copy link
Collaborator

Integrating the dashboard into openshift env.

  1. Creates the dashboard-custom imagestream if needed
  2. Builds the patched dashboard image with OpenWebUI integration
  3. Pushes the image to the OpenShift internal registry
  4. Applies the deployment YAML if the dashboard doesn't exist, or updates the image if it does
  5. Waits for the rollout to complete

Access the Dashboard

# Get the dashboard URL
oc get route dashboard -n vllm-semantic-router-system -o jsonpath='https://{.spec.host}'

Why a Custom Build?

The upstream dashboard uses localhost:3001 for local OpenWebUI development. In OpenShift:

  • Services are accessed via routes with unique hostnames
  • The OpenWebUI URL must be dynamically constructed based on the deployment environment
  • The patch is applied during build time to inject this logic

yossiovadia and others added 2 commits October 17, 2025 11:24
Add OpenShift deployment support for the semantic router dashboard
with integrated OpenWebUI playground functionality.

This enables running the dashboard on OpenShift with:
- Dashboard UI for router configuration
- OpenWebUI playground for LLM interaction
- Dynamic hostname detection for OpenShift routes
- Custom build system with frontend patches

Components:

deploy/openshift/dashboard/
├── dashboard-deployment.yaml    - Kubernetes resources (deployment, service, route)
├── PlaygroundPage.tsx.patch     - Frontend patch for OpenShift URL detection
├── build-custom-dashboard.sh    - Automated build and deployment script
└── README.md                    - Build and deployment instructions

Implementation Details:
- PlaygroundPage patch detects OpenShift hostname and constructs OpenWebUI URL
  (dashboard-vllm-semantic-router-system → openwebui-vllm-semantic-router-system)
- Uses direct OpenWebUI route instead of embedded proxy
- Works with pre-built OpenWebUI images (no build-time configuration needed)
- Build script applies patches and pushes custom image to OpenShift registry

Deployment:
1. Deploy dashboard: oc apply -f deploy/openshift/dashboard/dashboard-deployment.yaml
2. Build custom image: ./deploy/openshift/dashboard/build-custom-dashboard.sh
3. Access playground at dashboard route /playground

Testing:
Verified end-to-end on OpenShift cluster:
- Dashboard accessible via HTTPS route
- OpenWebUI playground loads correctly in iframe
- Dynamic URL construction works
- All functionality working without 404 errors

Signed-off-by: Yossi Ovadia <yovadia@redhat.com>
…WebUI playground

This commit improves the OpenShift dashboard deployment workflow by:

1. **Single-step deployment**: Users now only need to run
   `./deploy/openshift/dashboard/build-custom-dashboard.sh` for both fresh
   deployments and updates. The script automatically detects if the
   deployment exists and handles both scenarios.

2. **Automatic imagestream creation**: The build script now creates the
   `dashboard-custom` imagestream if it doesn't exist, eliminating manual
   setup steps.

3. **Updated deployment YAML**: Changed the default image reference from
   the base GitHub image to the custom OpenShift-built image
   (`image-registry.openshift-image-registry.svc:5000/...`), ensuring the
   patched version is deployed by default.

4. **Improved documentation**: Updated README with clear single-command
   instructions and explanation of how the PlaygroundPage.tsx patch enables
   OpenWebUI integration in OpenShift's route-based architecture.

The PlaygroundPage.tsx patch enables hostname-aware URL construction,
automatically detecting OpenShift routes and loading OpenWebUI correctly
instead of showing "404: Not Found".

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Yossi Ovadia <yovadia@redhat.com>
Copy link

netlify bot commented Oct 17, 2025

Deploy Preview for vllm-semantic-router ready!

Name Link
🔨 Latest commit f821e3a
🔍 Latest deploy log https://app.netlify.com/projects/vllm-semantic-router/deploys/68f3f30282d18600082d22c6
😎 Deploy Preview https://deploy-preview-469--vllm-semantic-router.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

github-actions bot commented Oct 17, 2025

👥 vLLM Semantic Team Notification

The following members have been identified for the changed files in this PR and have been automatically assigned:

📁 deploy

Owners: @rootfs, @Xunzhuo
Files changed:

  • deploy/openshift/dashboard/PlaygroundPage.tsx.patch
  • deploy/openshift/dashboard/README.md
  • deploy/openshift/dashboard/build-custom-dashboard.sh
  • deploy/openshift/dashboard/dashboard-deployment.yaml

vLLM

🎉 Thanks for your contributions!

This comment was automatically generated based on the OWNER files in the repository.

@yossiovadia
Copy link
Collaborator Author

Sample ( on openshift )
image

@rootfs rootfs requested a review from Copilot October 17, 2025 20:01
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR integrates a custom dashboard deployment for OpenShift environments with OpenWebUI playground functionality. The solution addresses the challenge of dynamic service routing in OpenShift by patching the dashboard to construct proper URLs based on the deployment environment.

  • Creates OpenShift-specific deployment configurations and build scripts for a custom dashboard
  • Implements hostname-aware URL construction to replace localhost references with OpenShift routes
  • Provides automated build and deployment process with proper image registry integration

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
deploy/openshift/dashboard/dashboard-deployment.yaml Complete Kubernetes deployment configuration including ConfigMap, Deployment, Service, and Route resources
deploy/openshift/dashboard/build-custom-dashboard.sh Automated build script that creates custom dashboard image with OpenWebUI patches and deploys to OpenShift
deploy/openshift/dashboard/README.md Documentation explaining the custom build process, deployment steps, and OpenShift-specific URL handling
deploy/openshift/dashboard/PlaygroundPage.tsx.patch Frontend patch implementing hostname-aware OpenWebUI URL construction for OpenShift environments

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

echo ""
echo "Logging in to OpenShift registry..."
TOKEN=$(oc whoami -t)
docker login -u $(oc whoami) -p $TOKEN $REGISTRY
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

Using command substitution in password parameter exposes credentials in process list. Store the username in a variable and use it in the login command to reduce exposure.

Suggested change
docker login -u $(oc whoami) -p $TOKEN $REGISTRY
USERNAME=$(oc whoami)
docker login -u $USERNAME -p $TOKEN $REGISTRY

Copilot uses AI. Check for mistakes.

Positive FeedbackNegative Feedback
echo ""
echo "Building docker image for linux/amd64 with no cache..."
cd $BUILD_DIR/dashboard
docker buildx build --no-cache --platform linux/amd64 -f Dockerfile.custom -t $REGISTRY/$NAMESPACE/$IMAGE_NAME:latest --load .
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

The hardcoded platform 'linux/amd64' may not work on all architectures. Consider using the host platform or making it configurable.

Copilot uses AI. Check for mistakes.

Positive FeedbackNegative Feedback
Comment on lines +4 to +10
const PlaygroundPage: React.FC = () => {
// Use the OpenWebUI route for OpenShift deployments, fallback to embedded proxy
const getOpenWebUIUrl = () => {
const hostname = window.location.hostname
// In OpenShift, use the direct OpenWebUI route
if (hostname.includes('dashboard-vllm-semantic-router-system')) {
return hostname.replace('dashboard-vllm-semantic-router-system', 'openwebui-vllm-semantic-router-system')
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

The hardcoded hostname pattern is fragile and will break if the namespace or service names change. Consider making these configurable through environment variables or props.

Suggested change
const PlaygroundPage: React.FC = () => {
// Use the OpenWebUI route for OpenShift deployments, fallback to embedded proxy
const getOpenWebUIUrl = () => {
const hostname = window.location.hostname
// In OpenShift, use the direct OpenWebUI route
if (hostname.includes('dashboard-vllm-semantic-router-system')) {
return hostname.replace('dashboard-vllm-semantic-router-system', 'openwebui-vllm-semantic-router-system')
// Make the hostname patterns configurable via environment variables, fallback to defaults
const DASHBOARD_HOST_PATTERN = process.env.REACT_APP_DASHBOARD_HOST_PATTERN || 'dashboard-vllm-semantic-router-system';
const OPENWEBUI_HOST_PATTERN = process.env.REACT_APP_OPENWEBUI_HOST_PATTERN || 'openwebui-vllm-semantic-router-system';
const PlaygroundPage: React.FC = () => {
// Use the OpenWebUI route for OpenShift deployments, fallback to embedded proxy
const getOpenWebUIUrl = () => {
const hostname = window.location.hostname
// In OpenShift, use the direct OpenWebUI route
if (hostname.includes(DASHBOARD_HOST_PATTERN)) {
return hostname.replace(DASHBOARD_HOST_PATTERN, OPENWEBUI_HOST_PATTERN)

Copilot uses AI. Check for mistakes.

Positive FeedbackNegative Feedback
@rootfs rootfs requested a review from Copilot October 18, 2025 20:05
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

echo "Preparing build directory with patched files..."
BUILD_DIR="/tmp/dashboard-build-$$"
mkdir -p $BUILD_DIR
cp -r dashboard $BUILD_DIR/
Copy link

Copilot AI Oct 18, 2025

Choose a reason for hiding this comment

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

The script copies from dashboard directory but this path is relative and may not exist from the script's location. Should use an absolute path like $SCRIPT_DIR/../../../dashboard or verify the dashboard directory exists relative to the script.

Copilot uses AI. Check for mistakes.

Positive FeedbackNegative Feedback
Comment on lines +44 to +47
if [ -f "$SCRIPT_DIR/main.go.patch" ]; then
cp "$SCRIPT_DIR/main.go.patch" "$BUILD_DIR/dashboard/backend/main.go"
echo " ✓ Applied main.go patch (OpenWebUI proxy + auth)"
fi
Copy link

Copilot AI Oct 18, 2025

Choose a reason for hiding this comment

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

The script references main.go.patch file that doesn't exist in the PR. Either include this patch file or remove the conditional logic that depends on it.

Suggested change
if [ -f "$SCRIPT_DIR/main.go.patch" ]; then
cp "$SCRIPT_DIR/main.go.patch" "$BUILD_DIR/dashboard/backend/main.go"
echo " ✓ Applied main.go patch (OpenWebUI proxy + auth)"
fi

Copilot uses AI. Check for mistakes.

Positive FeedbackNegative Feedback
Comment on lines +96 to +98
echo "Building docker image for linux/amd64 with no cache..."
cd $BUILD_DIR/dashboard
docker buildx build --no-cache --platform linux/amd64 -f Dockerfile.custom -t $REGISTRY/$NAMESPACE/$IMAGE_NAME:latest --load .
Copy link

Copilot AI Oct 18, 2025

Choose a reason for hiding this comment

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

Using --no-cache on every build will significantly slow down the build process. Consider removing this flag to allow Docker layer caching, which would improve build times for incremental changes.

Suggested change
echo "Building docker image for linux/amd64 with no cache..."
cd $BUILD_DIR/dashboard
docker buildx build --no-cache --platform linux/amd64 -f Dockerfile.custom -t $REGISTRY/$NAMESPACE/$IMAGE_NAME:latest --load .
echo "Building docker image for linux/amd64..."
cd $BUILD_DIR/dashboard
docker buildx build --platform linux/amd64 -f Dockerfile.custom -t $REGISTRY/$NAMESPACE/$IMAGE_NAME:latest --load .

Copilot uses AI. Check for mistakes.

Positive FeedbackNegative Feedback
@rootfs rootfs merged commit 886c99b into vllm-project:main Oct 18, 2025
10 of 11 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.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.