kserve: move control plane to kserve namespace#3515
Conversation
Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
|
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. |
| patches: | ||
| # Fix cert-manager inject-ca-from annotations: kserve_kubeflow.yaml hardcodes | ||
| # "kserve/<cert-name>" in the inject-ca-from annotation on all webhook configs and CRDs, | ||
| # but the Certificate resources live in the "kubeflow" namespace. cert-manager's ca-injector | ||
| # uses this annotation to populate the webhook caBundle, so without this fix TLS verification | ||
| # fails with "certificate signed by unknown authority". | ||
| - patch: |- | ||
| - op: replace | ||
| path: /metadata/annotations/cert-manager.io~1inject-ca-from | ||
| value: kubeflow/serving-cert | ||
| target: | ||
| name: "(clusterservingruntime|inferencegraph|inferenceservices?|servingruntime|trainedmodel)\\.serving\\.kserve\\.io" | ||
| - patch: |- | ||
| - op: replace | ||
| path: /metadata/annotations/cert-manager.io~1inject-ca-from | ||
| value: kubeflow/llmisvc-serving-cert | ||
| target: | ||
| name: "llminferenceservice(s|config|configs)?\\.serving\\.kserve\\.io" | ||
| - patch: |- | ||
| - op: replace | ||
| path: /metadata/annotations/cert-manager.io~1inject-ca-from | ||
| value: kubeflow/localmodel-serving-cert | ||
| target: | ||
| name: "localmodelcache\\.serving\\.kserve\\.io" | ||
|
|
||
| # Fix Certificate SANs: kserve_kubeflow.yaml contains a second set of Certificate resources | ||
| # that still reference the upstream kserve namespace instead of kubeflow. | ||
| # These duplicates override the correct kubeflow-scoped ones, causing TLS SAN mismatches | ||
| # on the webhook server. Patch all three to use the correct kubeflow.svc SAN. | ||
| - patch: | | ||
| apiVersion: cert-manager.io/v1 | ||
| kind: Certificate | ||
| metadata: | ||
| name: serving-cert | ||
| namespace: kubeflow | ||
| spec: | ||
| commonName: kserve-webhook-server-service.kubeflow.svc | ||
| dnsNames: | ||
| - kserve-webhook-server-service.kubeflow.svc | ||
| - patch: | | ||
| apiVersion: cert-manager.io/v1 | ||
| kind: Certificate | ||
| metadata: | ||
| name: llmisvc-serving-cert | ||
| namespace: kubeflow | ||
| spec: | ||
| commonName: llmisvc-webhook-server-service.kubeflow.svc | ||
| dnsNames: | ||
| - llmisvc-webhook-server-service.kubeflow.svc | ||
| - patch: | | ||
| apiVersion: cert-manager.io/v1 | ||
| kind: Certificate | ||
| metadata: | ||
| name: localmodel-serving-cert | ||
| namespace: kubeflow | ||
| spec: | ||
| commonName: localmodel-webhook-server-service.kubeflow.svc | ||
| dnsNames: | ||
| - localmodel-webhook-server-service.kubeflow.svc | ||
|
|
||
| # Delete the kserve-localmodelnode-agent DaemonSet | ||
| # Runs as privileged: true with hostPID: true and hostNetwork: true | ||
| - patch: | | ||
| apiVersion: apps/v1 | ||
| kind: DaemonSet | ||
| metadata: | ||
| name: kserve-localmodelnode-agent | ||
| namespace: kubeflow | ||
| namespace: kserve | ||
| $patch: delete | ||
|
|
✏️ Summary of Changes
This follow-up moves KServe-owned control-plane resources out of the
kubeflownamespace and into the upstreamkservenamespace.kserve.yaml, add a managedNamespace/kserve, and keep local Kubeflow-specific patches outside the generated upstream bundle.kubeflow, keeping aggregatekubeflow-kserve-*user roles, and keepinginferenceservice-configpointed atkubeflow/kubeflow-gatewaywith the existing path template.kserve, update install waits and Pod Security Standards coverage, and includekservediagnostics in CI logs.kubeflowbykubectl apply.📦 Dependencies
None.
🐛 Related Issues
Follow-up to #3505.
✅ Contributor Checklist
Verification
git diff --checkbash -n tests/kserve_install.sh tests/kserve_test.sh tests/PSS_enable.sh scripts/synchronize-kserve-kserve-manifests.shkustomize build applications/kserve/kservekustomize build applications/kserve/models-web-app/overlays/kubeflowkustomize build common/kubeflow-namespace/basekustomize build exampleNamespace/kserve,inferenceservice-config, webhook CA/cert references, localmodel DaemonSet removal, LLM config cleanup, and Models Web Application namespace preservation./tests/helm_kustomize_compare.sh kserve-models-web-app base./tests/helm_kustomize_compare.sh kserve-models-web-app kubeflowNot run locally: cluster runtime tests, because there was no active
kubectlcurrent context in this workspace.