-
Notifications
You must be signed in to change notification settings - Fork 62
feat: Add configurable namespaces for standalone deployment #136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: prateek <[email protected]>
@juliusvonkohout please approve the workflows, @Prateekbala thank you for your contribution |
@LogicalGuy77 Yes, but please focus primarily on the tests in kubeflow/manifests |
@Griffin-Sullivan for review |
yes working on manifests currently, my colleague wanted to get into open source so pointed him towards this issue. |
What a wonderful idea :-) There will be GSOC 2026 ;-) |
Hi , I’ve fixed the formatting issues and committed the changes. The workflow checks are now pending and require approval—could you please review and approve them? Thanks! |
Signed-off-by: prateek <[email protected]>
There are some errors, for example here https://github.com/kserve/models-web-app/actions/runs/18170289667/job/51992626737?pr=136. You can also run these tests locally. |
This PR implements configurable namespace filtering for standalone Models Web App deployments, addressing issue #43. Users can now control which namespaces are available in the namespace selector through an environment variable.
Changes Made
Backend
New API endpoint: Added /api/namespaces endpoint in get.py
Environment variable support: Implements ALLOWED_NAMESPACES configuration
Filtering logic: Parses comma-separated namespace list and validates against existing Kubernetes namespaces
Error handling: Falls back to all namespaces if specified ones don't exist
Frontend
New service: Created MWANamespaceService to handle filtered namespace logic
Custom component: Implemented NamespaceSelectComponent that conditionally shows/hides the dropdown
Auto-selection: Single namespace is automatically selected when only one is configured
UI integration: Updated index component to use the new namespace selector
Documentation
README updates: Added environment variable documentation and usage examples
Configuration
The feature is controlled by the ALLOWED_NAMESPACES environment variable:
Empty/unset: Default behavior - shows all namespaces.
Single namespace: ALLOWED_NAMESPACES="kubeflow-user" - auto-selects and hides dropdown.
Multiple namespaces: ALLOWED_NAMESPACES="ns1,ns2,ns3" - shows filtered dropdown.
Behavior
Default mode: When ALLOWED_NAMESPACES is not set, all namespaces are shown (backward compatible)
Single namespace mode: Dropdown is hidden and namespace is auto-selected.
Multi-namespace mode: Dropdown shows only specified namespaces.
Error resilience: Falls back to all namespaces if configuration is invalid.
Backward Compatibility
This change is fully backward compatible:
Existing deployments continue to work without any configuration changes.
No breaking changes to existing APIs or components.
Default behavior remains unchanged when environment variable is not set.
Resolves
Closes #43