kserve: move platform resources to kserve namespace - #3515
Conversation
|
Welcome to the Kubeflow Community Distribution 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. |
|
[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 |
There was a problem hiding this comment.
Pull request overview
This pull request moves KServe control-plane resources from the kubeflow namespace to the upstream kserve namespace while preserving Kubeflow-facing behavior (notably keeping the KServe Models Web Application in kubeflow).
Changes:
- Add and manage
Namespace/kserve, and update the KServe installation kustomization to install control-plane resources there (including webhook NetworkPolicy coverage). - Update installation and continuous integration scripts to wait for and collect diagnostics from the
kservenamespace. - Document upgrade cleanup steps to remove legacy
kubeflow-scoped KServe control-plane resources.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
tests/PSS_enable.sh |
Includes kserve in Pod Security Standards enforcement labeling. |
tests/kserve_install.sh |
Updates waits and diagnostics to reflect KServe control-plane deployment in kserve. |
README.md |
Documents the new namespace split and adds upgrade cleanup instructions. |
common/kubeflow-namespace/base/kubeflow/kustomization.yaml |
Stops applying the old kubeflow-scoped KServe NetworkPolicy. |
common/kubeflow-namespace/base/kubeflow/kserve.yaml |
Removes the old kubeflow-scoped KServe webhook NetworkPolicy manifest. |
applications/kserve/UPGRADE.md |
Adds upgrade guidance for cleaning up legacy kubeflow-scoped KServe control-plane resources. |
applications/kserve/kserve/namespace.yaml |
Introduces managed Namespace/kserve with labels for control-plane and Pod Security Standards. |
applications/kserve/kserve/kustomization.yaml |
Installs upstream KServe resources into kserve, adds aggregated roles and kserve-scoped webhook NetworkPolicy, and updates local patches accordingly. |
applications/kserve/kserve/kserve-networkpolicy.yaml |
Adds kserve-scoped NetworkPolicy allowing admission webhook ingress on port 9443. |
applications/kserve/kserve/aggregated-roles.yaml |
Expands aggregated Kubeflow KServe roles to include additional KServe resources. |
.github/workflows/kserve_test.yaml |
Adds common/kubeflow-namespace/** trigger and includes kserve namespace in diagnostics capture. |
.github/workflows/kserve_models_web_application_test.yaml |
Adds common/kubeflow-namespace/** trigger. |
.github/workflows/full_kubeflow_integration_test.yaml |
Includes kserve namespace in diagnostics capture. |
a41eace to
f635136
Compare
6961ac0 to
48761fc
Compare
48761fc to
6b61122
Compare
Move the KServe control plane and Models Web Application into the kserve namespace while preserving user InferenceService resources in Profile namespaces and routing through the Kubeflow gateway. Align namespace foundation ownership, workload-specific Istio injection, NetworkPolicies, the existing Models Web Application chart, synchronization behavior, installation tests, and upgrade cleanup guidance. Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
6b61122 to
fb1b194
Compare
The manifest test asserted properties that the live KinD run in tests/kserve_test.sh already proves, and asserted documentation prose and shell source text that no rendered resource depends on. Remove the assertions covered by the cluster run: the Models Web Application route, which Test 3 proves by requesting /kserve-endpoints, and the inferenceservice-config gateway and path template, which Test 2a proves by path-based routing. Remove the assertions on prose and source text. The root README upgrade steps are version-specific and are rewritten each release, so pinning their wording fails an unrelated release-notes edit. The kustomization comment assertions only prevent removed comments from being retyped. Keep the checks a green cluster run cannot make: resources left behind in kubeflow, sidecar injection selecting the Models Web Application through a pod label rather than an annotation, the storage initializer security context that no restricted namespace exercises in CI, namespace fields on cluster-scoped resources that the API server silently drops, the disabled local model node agent whose rejected pods create no pods to wait for, and the webhook certificate and authority references for the llmisvc and localmodel chains that no test calls. Document on each remaining test why the cluster run cannot catch it. Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
|
/retest |
1 similar comment
|
/retest |
|
@juliusvonkohout for review |
| ./tests/kserve_install.sh | ||
| ``` | ||
|
|
||
| The KServe control plane is installed in the `kserve` namespace. The KServe UI remains in the `kubeflow` namespace. |
| "$ROOT_DIRECTORY/common/istio/istio-namespace/base" | ||
| "$ROOT_DIRECTORY/common/oauth2-proxy/base" | ||
| "$ROOT_DIRECTORY/common/dex/base" | ||
| "$ROOT_DIRECTORY/applications/kserve/kserve" |
| self.assertNotEqual( | ||
| resource.get("metadata", {}).get("namespace"), | ||
| "kubeflow", |
Summary of Changes
This follow-up moves KServe-owned platform resources from
kubeflowto theupstream
kservenamespace.kserve, includingcontrollers, webhooks, certificates, namespaced RBAC, and
inferenceservice-config.kservewhile preserving routing through
kubeflow/kubeflow-gateway.InferenceServiceresources and serving workloads in Profilenamespaces.
Namespace/kserve;add equivalent namespace ownership and restricted Pod Security labels to the
kubeflow-namespacesfoundation chart.while retaining explicit injection for the Models Web Application.
incompatible local model node agent.
version handling, and upgrade cleanup guidance.
Ownership Boundaries
The component Kustomization owns
Namespace/kservefor direct Kustomizeinstallation. Helm component charts do not create namespaces; the
kubeflow-namespacesfoundation chart ownsNamespace/kservefor Helminstallation.
This pull request only aligns the existing Models Web Application chart with
the relocation. Generated KServe control-plane charts and their synchronization
pipeline remain separate future Helm work.
Upgrade Notes
Controllers in the old and new namespaces use different leader-election
Leases, so the old
kubeflowcontrollers must be scaled to zero before the newcontrollers start. The old Models Web Application route and namespaced
resources must also be removed to prevent duplicate routing and stale
resources.
The documented cleanup does not delete KServe CRDs, user
InferenceServiceobjects, Profile namespaces, or model-serving workloads. Existing Helm
installations must uninstall the Models Web Application release from
kubeflowand install a new release inkserve, because Helm cannot move arelease between namespaces.
Related Issues
Follow-up to #3505 and the namespace recommendation in the pull request
discussion.
Contributor Checklist
Verification
python3 tests/kserve_manifest_test.pygit diff --check upstream/master...HEADshared namespaces, and complete example
kubeconformvalidation of both KServe renderingstests/helm_kustomize_compare_all.sh allparity matrixNetworkPolicies, Pod Security, Istio injection, upgrade cleanup, and Helm
ownership
Not run locally: live-cluster admission, runtime, and in-place migration tests
because no active Kubernetes context was available.
Related Issues
Tracking issue:
#3561