Skip to content

fix(model-registry): add namespace to kustomization overlays to prevent deployment to default namespace#3458

Open
Raakshass wants to merge 1 commit into
kubeflow:masterfrom
Raakshass:fix-model-registry-default-namespace
Open

fix(model-registry): add namespace to kustomization overlays to prevent deployment to default namespace#3458
Raakshass wants to merge 1 commit into
kubeflow:masterfrom
Raakshass:fix-model-registry-default-namespace

Conversation

@Raakshass
Copy link
Copy Markdown
Contributor

Summary

Fix model-registry and catalog resources deploying to default namespace instead of kubeflow when using kustomize 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) uses kubectl 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 in default.

Christian's istioctl analyze output confirmed:

Error [IST0101] (VirtualService default/model-registry) Referenced gateway not found: "kubeflow-gateway"
Warning [IST0174] (DestinationRule default/model-registry-service) The host ... does not match any services in the mesh

Changes

File Change
upstream/overlays/postgres/kustomization.yaml add namespace: kubeflow
upstream/options/istio/kustomization.yaml add namespace: kubeflow
upstream/options/catalog/overlays/demo/kustomization.yaml add namespace: kubeflow

No change needed for options/ui/overlays/istio/kustomization.yaml — already has namespace: kubeflow.

Design Decision

This matches the pattern used by every other component in example/kustomization.yaml:

  • KServe models-web-app: overlays/kubeflow/kustomization.yamlnamespace: kubeflow
  • Katib: installs/katib-with-kubeflow/kustomization.yamlnamespace: kubeflow
  • Model Registry UI (already correct): options/ui/overlays/istio/kustomization.yamlnamespace: kubeflow

Verification

After this fix, kustomize build example/ produces all model-registry resources with namespace: kubeflow in their metadata, matching runtime behavior in CI and resolving the Istio gateway/service reference errors.

Contributor Checklist

  • DCO sign-off included
  • Matches existing codebase patterns
  • Minimal scope — only the 3 files that need the fix
  • Root cause identified and stated in one sentence

Signed-off-by: Siddhant Jain siddhantjainofficial26@gmail.com

Copilot AI review requested due to automatic review settings May 13, 2026 00:38
@google-oss-prow google-oss-prow Bot requested a review from tarilabs May 13, 2026 00:38
@google-oss-prow
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign tomcli for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow Bot requested a review from Tomcli May 13, 2026 00:38
@github-actions
Copy link
Copy Markdown

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:
Please ensure your PR follows our Contributing Guide.
Please also be aware that many components are synchronizes from upstream via the scripts in /scripts.
So in some cases you have to fix the problem in the upstream repositories first, but you can use a PR against kubeflow/manifests to test the platform integration.

Community Resources:

Thanks again for helping to improve Kubeflow.

Copy link
Copy Markdown
Contributor

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 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: kubeflow to the Model Registry PostgreSQL overlay kustomization.
  • Add namespace: kubeflow to the Model Registry Istio networking overlay kustomization.
  • Add namespace: kubeflow to 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>
@Raakshass Raakshass force-pushed the fix-model-registry-default-namespace branch from 89cad43 to e7f0ec2 Compare May 13, 2026 00:41
@Raakshass
Copy link
Copy Markdown
Contributor Author

/retest

Copy link
Copy Markdown
Contributor

@christian-heusel christian-heusel left a comment

Choose a reason for hiding this comment

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

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. 🤗 🤖

@Raakshass
Copy link
Copy Markdown
Contributor Author

Raakshass commented May 13, 2026

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.
regarding ai yes, i used ai assistance for the root cause investigation and pr description drafting and ill make sure to add suitable tags. the code change itself is adding namespace: kubeflow to 3 yaml files. i should have included the disclosure in the commit message, that was an oversight on my part. apologies for missing that.

should i close this pr and raise the fix upstream in kubeflow/model-registry, or would you prefer a different approach?

@jonburdo
Copy link
Copy Markdown
Member

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 kubeflow/hub (we renamed the kubeflow/model-registry repo to kubeflow/hub). For example: https://github.com/kubeflow/hub/blob/main/manifests/kustomize/overlays/postgres/kustomization.yaml and the other two

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 )

@jonburdo
Copy link
Copy Markdown
Member

Also may be worth adding a basic test/check in kubeflow/hub for missing/default ns to guard against regression

@juliusvonkohout
Copy link
Copy Markdown
Member

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.

@juliusvonkohout
Copy link
Copy Markdown
Member

Also may be worth adding a basic test/check in kubeflow/hub for missing/default ns to guard against regression

yes, @Raakshass in the tests we should fail if anything is in the "default" namespace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hub / Model Registry is being deployed to the namespace default

5 participants