fix(model-registry): add namespace to kustomization overlays to prevent deployment to default namespace#3458
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
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
This pull request fixes a namespace omission in several Model Registry / Model Catalog kustomize overlays so that kustomize build example/ | kubectl apply -f - generates namespaced resources in kubeflow (instead of falling back to default).
Changes:
- Add
namespace: kubeflowto the Model Registry PostgreSQL overlay kustomization. - Add
namespace: kubeflowto the Model Registry Istio networking overlay kustomization. - Add
namespace: kubeflowto the Model Catalog demo overlay kustomization.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| applications/model-registry/upstream/overlays/postgres/kustomization.yaml | Sets overlay namespace to kubeflow so DB/server resources don’t land in default when built from example/. |
| applications/model-registry/upstream/options/istio/kustomization.yaml | Ensures Model Registry Istio resources (e.g., VirtualService/DestinationRule) are generated in kubeflow. |
| applications/model-registry/upstream/options/catalog/overlays/demo/kustomization.yaml | Ensures Model Catalog demo resources/configmaps are generated in kubeflow. |
…nt deployment to default namespace Three of four model-registry kustomization overlays referenced by example/kustomization.yaml were missing `namespace: kubeflow`. The CI install script masked this by using `kubectl apply -n kubeflow`, but `kustomize build example/ | kubectl apply -f -` (the documented deployment path) has no such override, causing all model-registry and catalog resources to deploy to the default namespace. Add `namespace: kubeflow` to the three affected overlays: - upstream/overlays/postgres/kustomization.yaml - upstream/options/istio/kustomization.yaml - upstream/options/catalog/overlays/demo/kustomization.yaml The fourth overlay (options/ui/overlays/istio) already had it. Fixes kubeflow#3457 Signed-off-by: Siddhant Jain <siddhantjainofficial26@gmail.com>
89cad43 to
e7f0ec2
Compare
|
/retest |
christian-heusel
left a comment
There was a problem hiding this comment.
Please do not modify the upstream folders directly, otherwise these changes will be lost on the next sync 😅
Also did you use AI in any capacity while creating this contribution? I see that your commit does not carry any Assisted-By: <...> / Co-authored-by: <...> tags, so I wanted to make sure that you're aware of the Kubeflow AI Policy. 🤗 🤖
you are right about the upstream folder i missed the sync script. the fix should go to kubeflow/model-registry first and then be synced down. i will raise the fix there instead. should i close this pr and raise the fix upstream in kubeflow/model-registry, or would you prefer a different approach? |
IIUC, yes, the changes should be made in Thanks for working on this @Raakshass! (Fyi, we made a similar mistake in the past (modifying upstream dirs here instead of in component repo) and had to sync back: kubeflow/hub#2706 ) |
|
Also may be worth adding a basic test/check in |
|
Please also rebase or just raise a new PR after https://github.com/kubeflow/manifests/pull/3450/changes and get the changes merged upstream. @tarilabs and @pboyd can hopefully help you. |
yes, @Raakshass in the tests we should fail if anything is in the "default" namespace. |
Summary
Fix model-registry and catalog resources deploying to
defaultnamespace instead ofkubeflowwhen usingkustomize build example/.Fixes #3457
Root Cause
Three of the four model-registry kustomization overlays added in #3318 were missing
namespace: kubeflow. The CI install script (model_registry_install.sh) useskubectl apply -n kubeflow, which masked the issue during CI, but the documented deployment path (kustomize build example/ | kubectl apply -f -) has no namespace override — resources land indefault.Christian's
istioctl analyzeoutput confirmed:Changes
upstream/overlays/postgres/kustomization.yamlnamespace: kubeflowupstream/options/istio/kustomization.yamlnamespace: kubeflowupstream/options/catalog/overlays/demo/kustomization.yamlnamespace: kubeflowNo change needed for
options/ui/overlays/istio/kustomization.yaml— already hasnamespace: kubeflow.Design Decision
This matches the pattern used by every other component in
example/kustomization.yaml:overlays/kubeflow/kustomization.yaml→namespace: kubeflowinstalls/katib-with-kubeflow/kustomization.yaml→namespace: kubeflowoptions/ui/overlays/istio/kustomization.yaml→namespace: kubeflowVerification
After this fix,
kustomize build example/produces all model-registry resources withnamespace: kubeflowin their metadata, matching runtime behavior in CI and resolving the Istio gateway/service reference errors.Contributor Checklist
Signed-off-by: Siddhant Jain siddhantjainofficial26@gmail.com