Skip to content

[Core] Mount PVC-backed models into ISVC pods - #656

Merged
pallasathena92 merged 1 commit into
mainfrom
yifeliu/isvc-pvc-mount
Jul 7, 2026
Merged

pallasathena92 merged 1 commit into
mainfrom
yifeliu/isvc-pvc-mount

Conversation

@pallasathena92

@pallasathena92 pallasathena92 commented Jul 7, 2026 •

Copy link
Copy Markdown
Collaborator

What this PR does

Makes PVC-backed BaseModels servable by mounting the PVC into
InferenceService pods. A pvc:// model has Storage.Path == nil (nothing
is downloaded to a node), so the existing HostPath-based volume/mount logic
never fires for it — the pod would come up with no model. This adds PVC
handling to pod-spec assembly.

Why we need it

This is the serving-side half of PVC support. The BaseModel controller can
bring a pvc:// model to Ready, but without mounting the claim into the
serving pod the model isn't reachable. PVC is the natural source for
pre-provisioned / air-gapped weights on shared storage (CSI, NFS, Lustre) —
no per-node download, no egress.

What changes

  • components/pvc.go (new) — pure helpers (isPVCBaseModel,
    parsePVCComponents, and the StorageSpec-level isPVCStorage /
    parsePVCStorage) over pkg/utils/storage.
  • PVC branches in four components/base.go functions (each falls back
    to the existing HostPath/Path behavior for non-PVC models):
    • UpdatePodSpecVolumes — a PersistentVolumeClaimVolumeSource{ClaimName, ReadOnly} instead of a HostPath volume.
    • UpdateVolumeMounts — mount at ModelDefaultMountPath with SubPath
      set to the model's sub-path within the claim, read-only.
    • UpdatePodSpecNodeSelector — skip the per-node model-ready affinity:
      PVCs aren't node-pinned and the model agent never labels nodes for them,
      so that selector would leave the pod unschedulable. Runtime /
      AcceleratorClass node selectors still apply.
    • UpdateEnvVariables — set MODEL_PATH to ModelDefaultMountPath
      (Storage.Path is nil for PVC).
      Fixes #

How to test

Checklist

  • Tests added/updated (if applicable)
  • Docs updated (if applicable)
  • make test passes locally

@github-actions github-actions Bot added inferenceservice InferenceService controller changes controller Controller changes tests Test changes labels Jul 7, 2026
@pallasathena92
pallasathena92 merged commit f090b91 into main Jul 7, 2026
14 checks passed
@pallasathena92
pallasathena92 deleted the yifeliu/isvc-pvc-mount branch July 7, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

controller Controller changes inferenceservice InferenceService controller changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants