Skip to content

fix(nvca): default NVMesh model cache volumes to nvcf-sc-30, not nvcf-sc - #1311

Draft
apartha-nv wants to merge 1 commit into
mainfrom
fix/nvmesh-modelcache-storageclass-default
Draft

fix(nvca): default NVMesh model cache volumes to nvcf-sc-30, not nvcf-sc#1311
apartha-nv wants to merge 1 commit into
mainfrom
fix/nvmesh-modelcache-storageclass-default

Conversation

@apartha-nv

Copy link
Copy Markdown
Contributor

Summary

  • doModelCacheNVMesh only runs once SelectHelmCacheBackend has confirmed nvcf-sc-30 exists in the cluster, but the unconfigured storage-class default it applied to the PVC was DefaultModelCacheStorageClassName ("nvcf-sc") — the Samba-oriented default. Since both classes share the same NVMesh CSI provisioner (nvmesh-csi.excelero.com), volumes silently landed on the wrong tier instead of failing loudly.
  • Adds nvmeshModelCacheStorageClassName, used only for NewReconciler's one-time resolution of modelCacheStorageClass (consumed exclusively by doModelCacheNVMesh), defaulting to NVMeshStorageClassName.
  • Splits off a new sambaModelCacheStorageClass field, resolved from the same override via the original ModelCacheStorageClassName default, so doModelCacheSamba's backing PVC keeps landing on nvcf-sc regardless of the NVMesh-side default change.

Test plan

  • TestNvmeshModelCacheStorageClassNameResolution — new unit test pinning the NVMesh default
  • TestModelCacheStorageClassResolvedOnce — updated to expect nvcf-sc-30 as the NVMesh default
  • TestSambaModelCacheStorageClassResolvedOnce — new unit test confirming Samba's field independently still defaults to nvcf-sc
  • TestApplyModelCacheStorageClass — updated expectation
  • TestReconcile_ModelCacheSamba (envtest) — extended to assert the Samba backing PVC's storage class end-to-end
  • go test ./pkg/storage/... passes in full (envtest via KUBEBUILDER_ASSETS)
  • go vet ./pkg/storage/... clean

Marked as draft — opening for early feedback before final review.

doModelCacheNVMesh only runs once SelectHelmCacheBackend has confirmed
NVMeshStorageClassName ("nvcf-sc-30") exists in the cluster, but the
unconfigured storage class default it applied to the PVC was the
Samba-oriented DefaultModelCacheStorageClassName ("nvcf-sc"). Both
classes share the same NVMesh CSI provisioner, so the volume silently
landed on the wrong tier instead of failing loudly.

Add nvmeshModelCacheStorageClassName, used only by NewReconciler's
one-time resolution of modelCacheStorageClass (consumed exclusively by
doModelCacheNVMesh), defaulting to NVMeshStorageClassName. Split off a
new sambaModelCacheStorageClass field, resolved from the same override
via the original ModelCacheStorageClassName default, so
doModelCacheSamba's backing PVC keeps landing on nvcf-sc regardless of
the NVMesh-side default change.
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant