fix(hub): deploy model registry to user profile namespace instead of default#3475
Conversation
…default Three of the four hub kustomizations referenced by example/kustomization.yaml had no namespace directive, causing kustomize build to emit resources without namespace metadata. kubectl apply then deployed them to the default namespace. This was introduced by kubeflow#3318 and masked by the CI install script which passes -n kubeflow explicitly. Per pboyd direction, model registry must live in the user profile namespace (kubeflow-user-example-com) for dashboard integration. Deploying to kubeflow breaks the dashboard (hub#1045). Changes: - Add applications/hub/overlays/kustomization.yaml wrapping all 4 upstream resources with namespace: kubeflow-user-example-com and 6 Istio patches: - 2 gateway refs: kubeflow-gateway -> kubeflow/kubeflow-gateway (Istio resolves gateway names relative to VirtualService namespace) - 4 FQDN hosts: .kubeflow.svc.cluster.local -> .kubeflow-user-example-com.svc.cluster.local (services move with overlay) - Simplify example/kustomization.yaml from 4 upstream paths to 1 overlay - Update tests/model_registry_install.sh to use overlay and target kubeflow-user-example-com namespace - Fix tests/model_registry_test.sh port-forward to target correct namespace - Add applications/hub/overlays/** to model_registry_test.yaml CI triggers Fixes kubeflow#3457 Signed-off-by: Siddhant Jain <siddhantjainofficial26@gmail.com>
|
Welcome to the Kubeflow Manifests Repository Thanks for opening your first PR. Your contribution means a lot to the Kubeflow community. Before making more PRs: Community Resources:
Thanks again for helping to improve Kubeflow. |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR consolidates Hub-related deployments into a single Kustomize overlay and updates the local install + integration test scripts to operate in the profile namespace (kubeflow-user-example-com) instead of the shared kubeflow namespace.
Changes:
- Added
applications/hub/overlaysKustomize overlay to deploy Hub components intokubeflow-user-example-comand patch Istio references accordingly. - Updated install/test scripts to target
kubeflow-user-example-com. - Updated example kustomization and workflow path filters to reference the new overlay.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/model_registry_test.sh | Port-forward now targets the profile namespace service. |
| tests/model_registry_install.sh | Installs Hub via the new overlay and waits/logs in the profile namespace. |
| example/kustomization.yaml | Switches from listing individual Hub resources to the single overlay. |
| applications/hub/overlays/kustomization.yaml | New overlay setting namespace + Istio patching for cross-namespace gateway and service FQDNs. |
| .github/workflows/model_registry_test.yaml | Ensures CI reruns when the new overlay changes. |
- Add trap-based port-forward cleanup in model_registry_test.sh matching the established pattern from model_catalog_test.sh (PID capture + explicit kill) and swfs_namespace_isolation_test.sh (trap cleanup EXIT) - Add fail-fast namespace existence check in model_registry_install.sh for local environments where the Profile controller may not have provisioned kubeflow-user-example-com - Update example/kustomization.yaml comment to reflect full overlay scope (Model Registry + UI + Istio resources + Model Catalog) Signed-off-by: Siddhant Jain <siddhantjainofficial26@gmail.com>
wait returns the exit code of the killed process (143 = 128 + SIGTERM), which triggers set -euxo pipefail and fails the script despite all 8 tests passing. Both model_catalog_test.sh and swfs_namespace_isolation_test.sh use kill without wait in their cleanup functions. Signed-off-by: Siddhant Jain <siddhantjainofficial26@gmail.com>
…xample-com The hub overlay moves all resources (including Model Catalog) to kubeflow-user-example-com. Both model_catalog_test.sh and model_catalog_install.sh still referenced -n kubeflow for deployment checks, service checks, pod listing, port-forward, and kubectl wait — causing failures since the resources no longer exist in the kubeflow namespace. Signed-off-by: Siddhant Jain <siddhantjainofficial26@gmail.com>
https://www.kubeflow.org/docs/components/hub/overview/#what-is-kubeflow-hub
|
…guard applies julius review suggestion to consolidate applications/hub/upstream/** and applications/hub/overlays/** into applications/hub/** for the model registry test workflow trigger. adds a default namespace isolation verification step to the full integration test that fails the build if any pods leak into the default namespace, providing diagnostic output for debugging. Signed-off-by: Siddhant Jain <siddhantjainofficial26@gmail.com>
|
hi julius, applied your workflow path suggestion in f7db495. addressing both points below. 1. namespace architecturehere is the exact deployment topology produced by this pr's overlay: graph TB
subgraph cluster["kubernetes cluster"]
subgraph kf["namespace: kubeflow"]
gw["kubeflow-gateway<br/>(istio ingress)"]
dashboard["central dashboard"]
end
subgraph user["namespace: kubeflow-user-example-com"]
subgraph registry["model registry"]
mr_deploy["model-registry-deployment"]
mr_db["model-registry-db"]
mr_ui["model-registry-ui"]
mr_vs["VirtualService: model-registry"]
mr_ui_vs["VirtualService: model-registry-ui"]
mr_dr["DestinationRule: model-registry-service"]
mr_ui_dr["DestinationRule: model-registry-ui"]
mr_authz["AuthorizationPolicy"]
end
subgraph catalog["model catalog"]
mc_server["model-catalog-server"]
mc_postgres["model-catalog-postgres"]
mc_configmaps["ConfigMaps: sources, perf-data"]
end
end
subgraph def["namespace: default"]
empty["empty — no kubeflow components"]
end
gw -- "patched: kubeflow/kubeflow-gateway" --> mr_vs
gw -- "patched: kubeflow/kubeflow-gateway" --> mr_ui_vs
mr_vs --> mr_deploy
mr_ui_vs --> mr_ui
mr_deploy --> mr_db
mc_server --> mc_postgres
end
style kf fill:#1a3a5c,stroke:#4a9eff,color:#ffffff
style user fill:#2d4a1a,stroke:#6abf40,color:#ffffff
style def fill:#4a1a1a,stroke:#ff4a4a,color:#ffffff
style registry fill:#1a4a2d,stroke:#40bf6a,color:#ffffff
style catalog fill:#4a3a1a,stroke:#bf9f40,color:#ffffff
key observations:
**you are correct that model catalog should logically be a cluster-wide singleton in to split model catalog into 2. default namespace guard testadded in f7db495 the step Fail if there are resources in the "default" namespace runs |
applies all 4 review suggestions from julius on the default namespace verification step: renamed step to explicitly state failure behavior, corrected echo wording to remove jargon, removed parenthetical from pod count, and updated pass message phrasing. Signed-off-by: Siddhant Jain <siddhantjainofficial26@gmail.com>
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: juliusvonkohout The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |

summary
deploys hub (model registry + model catalog) to the user profile namespace (
kubeflow-user-example-com) instead ofdefault. creates a manifests-level overlay with namespace assignment and 6 istio patches. adds a default namespace isolation guard to the full integration test workflow.fixes #3457
root cause
#3318 added 4 hub upstream references to
example/kustomization.yaml. three of them had nonamespace:directive. the continuous integration install script masked this by passing-n kubeflowtokubectl apply, but the documented single-command install (kustomize build example | kubectl apply -f -) deployed everything todefault.why
kubeflow-user-example-comand notkubeflowper pboyd's direction: model registry must live in the user profile namespace for dashboard integration. deploying to
kubeflowbreaks the dashboard (hub#1045). hub upstream must stay namespace-agnostic (hub#2709 — closed).namespace architecture
graph TB subgraph cluster["kubernetes cluster"] subgraph kf["namespace: kubeflow"] gw["kubeflow-gateway<br/>(istio ingress)"] dashboard["central dashboard"] end subgraph user["namespace: kubeflow-user-example-com"] subgraph registry["model registry"] mr_deploy["model-registry-deployment"] mr_db["model-registry-db"] mr_ui["model-registry-ui"] mr_vs["VirtualService: model-registry"] mr_ui_vs["VirtualService: model-registry-ui"] mr_dr["DestinationRule: model-registry-service"] mr_ui_dr["DestinationRule: model-registry-ui"] mr_authz["AuthorizationPolicy"] end subgraph catalog["model catalog"] mc_server["model-catalog-server"] mc_postgres["model-catalog-postgres"] mc_configmaps["ConfigMaps: sources, perf-data"] end end subgraph def["namespace: default"] empty["empty — no kubeflow components"] end gw -- "patched: kubeflow/kubeflow-gateway" --> mr_vs gw -- "patched: kubeflow/kubeflow-gateway" --> mr_ui_vs mr_vs --> mr_deploy mr_ui_vs --> mr_ui mr_deploy --> mr_db mc_server --> mc_postgres end style kf fill:#1a3a5c,stroke:#4a9eff,color:#ffffff style user fill:#2d4a1a,stroke:#6abf40,color:#ffffff style def fill:#4a1a1a,stroke:#ff4a4a,color:#ffffff style registry fill:#1a4a2d,stroke:#40bf6a,color:#ffffff style catalog fill:#4a3a1a,stroke:#bf9f40,color:#ffffffnote: the current upstream kubeflow/hub bundles model registry and model catalog as a single kustomize unit. this overlay deploys both to
kubeflow-user-example-com. per the hub documentation, model catalog is a read-only discovery service that should logically be a cluster-wide singleton inkubeflow. splitting it into a separatekubeflow-namespace deployment is pending maintainer direction (discussed in this comment).changes
applications/hub/overlays/kustomization.yamlnamespace: kubeflow-user-example-comand 4 JSON6902 patch entries (6 operations)example/kustomization.yamltests/model_registry_install.shkubeflow-user-example-comtests/model_registry_test.shtests/model_catalog_install.shkubeflow-user-example-comtests/model_catalog_test.shkubeflow-user-example-com.github/workflows/model_registry_test.yamlapplications/hub/**.github/workflows/full_kubeflow_integration_test.yamldefaultistio patches (6 operations across 4 entries)
setting
namespace: kubeflow-user-example-commoves all resources out ofkubeflow. six hardcoded istio references break and need patching:gateway references (2): istio resolves gateway names relative to the virtualservice namespace.
kubeflow-gatewaylives inkubeflow(kf-istio-resources.yaml), so virtualservices inkubeflow-user-example-commust usekubeflow/kubeflow-gateway. this matches workspaces, kserve, and notebooks.destination fully qualified domain names (4): services move to
kubeflow-user-example-comwith the overlay, so fully qualified domain names change from.kubeflow.svc.cluster.localto.kubeflow-user-example-com.svc.cluster.local.what is not changed
applications/hub/upstream/modified (hub stays namespace-agnostic)istio-systemservice accounts — namespace-independent, no patch neededcontinuous integration ordering verification
profile namespace
kubeflow-user-example-comis created before hub install in both continuous integration paths:cc @pboyd @christian-heusel