Bug Description
spec.modelCache.claimName (added in #960) lets an InferenceService point at a user-owned cache PVC. But when model caching is effectively OFF, a set claimName is silently ignored: the storage builder routes to buildEmptyDirStorageConfig, which never consults claimName, so the pod gets an emptyDir and re-downloads the model on every restart with no event, condition, or log.
Caching is off when useCache := effectiveModelCacheKey(model) != "" && r.ModelCachePath != "" is false, e.g.:
- the chart sets
modelCache.enabled: false,
- the model uses a
file:// / local source, or
- a remote single-file model is reconciled before
Status.CacheKey is populated.
#960 deliberately added a ModelCacheClaimIgnored warning for the pvc://-source case (inferenceservice_controller.go) to avoid exactly this silent drop, but the symmetric caching-off case was missed.
Steps to Reproduce
- Install the chart with
modelCache.enabled: false (or use a file:// model source).
- Create an InferenceService with
spec.modelCache.claimName: my-cache.
- Observe the pod mounts an
emptyDir, not the named PVC, and re-downloads on restart. No warning event is emitted.
Expected Behavior
When claimName is set but caching is off, emit the same ModelCacheClaimIgnored warning event (or fail closed), so the ignored config is visible. This matches the PR's own "no silent fallback" contract.
Actual Behavior
claimName is silently dropped; the pod gets an emptyDir and re-downloads every restart, with no event/condition/log.
Environment
LLMKube Version: main (post-#960)
Notes
Small, localized fix: add a claimName != "" && !useCache check next to the existing pvc:// warning in Reconcile (~15-20 lines + a unit test asserting the event). Follow-up from the #960 review; not a GC/data-loss risk (the user PVC is never adopted), purely an observability gap.
Bug Description
spec.modelCache.claimName(added in #960) lets an InferenceService point at a user-owned cache PVC. But when model caching is effectively OFF, a setclaimNameis silently ignored: the storage builder routes tobuildEmptyDirStorageConfig, which never consultsclaimName, so the pod gets anemptyDirand re-downloads the model on every restart with no event, condition, or log.Caching is off when
useCache := effectiveModelCacheKey(model) != "" && r.ModelCachePath != ""is false, e.g.:modelCache.enabled: false,file:/// local source, orStatus.CacheKeyis populated.#960 deliberately added a
ModelCacheClaimIgnoredwarning for thepvc://-source case (inferenceservice_controller.go) to avoid exactly this silent drop, but the symmetric caching-off case was missed.Steps to Reproduce
modelCache.enabled: false(or use afile://model source).spec.modelCache.claimName: my-cache.emptyDir, not the named PVC, and re-downloads on restart. No warning event is emitted.Expected Behavior
When
claimNameis set but caching is off, emit the sameModelCacheClaimIgnoredwarning event (or fail closed), so the ignored config is visible. This matches the PR's own "no silent fallback" contract.Actual Behavior
claimNameis silently dropped; the pod gets anemptyDirand re-downloads every restart, with no event/condition/log.Environment
LLMKube Version: main (post-#960)
Notes
Small, localized fix: add a
claimName != "" && !useCachecheck next to the existingpvc://warning inReconcile(~15-20 lines + a unit test asserting the event). Follow-up from the #960 review; not a GC/data-loss risk (the user PVC is never adopted), purely an observability gap.