[mlrun] Support ReadWriteMany access mode when worker replicas > 0#1133
Merged
liranbg merged 1 commit intov3io:developmentfrom Feb 16, 2026
Merged
[mlrun] Support ReadWriteMany access mode when worker replicas > 0#1133liranbg merged 1 commit intov3io:developmentfrom
liranbg merged 1 commit intov3io:developmentfrom
Conversation
- Add helper function to automatically set PVC access mode to ReadWriteMany when api.worker.minReplicas > 0 - This allows both chief and worker pods to share the same volume - Falls back to configured accessMode (default: ReadWriteOnce) when no workers are deployed - Bump chart version to 0.11.16 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR adds intelligent PVC access mode configuration for the MLRun API based on worker replica count, enabling automatic ReadWriteMany mode when multiple pods need to share the volume.
Changes:
- Added
mlrun.api.persistence.accessModehelper function that dynamically determines PVC access mode based on worker count - Updated PVC template to use the new helper function instead of direct value reference
- Changed default
accessModeto empty string in values.yaml to enable automatic inference
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| stable/mlrun/Chart.yaml | Bumped chart version from 0.11.15 to 0.11.16 |
| stable/mlrun/templates/_helpers.tpl | Added helper function to determine access mode: ReadWriteMany when workers > 0, ReadWriteOnce otherwise, with explicit override support |
| stable/mlrun/templates/mlrun-api-pvc.yaml | Updated to use new helper function for access mode determination |
| stable/mlrun/values.yaml | Changed default accessMode to empty string with comprehensive documentation explaining automatic inference behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds automatic ReadWriteMany (RWX) access mode configuration for MLRun API PVC based on worker replica count, with support for explicit override.
Changes
mlrun.api.persistence.accessModehelper function in_helpers.tplthat dynamically determines the PVC access modemlrun-api-pvc.yamlto use the new helper functionvalues.yamlto setaccessModeto empty string by default (enabling automatic inference)Behavior
The access mode is determined by the following logic:
accessModeis explicitly set: Use the provided value (regardless of worker count)worker.minReplicas > 0: Automatically useReadWriteManyto allow both chief and worker pods to share the volumeReadWriteOncefor single pod deploymentsThis provides flexibility - users can either:
accessModeempty for automatic inference based on worker count (recommended)accessModeto override the automatic behavior when neededTesting
Verified all scenarios with helm template:
ReadWriteOnce(inferred)ReadWriteMany(inferred)ReadWriteMany+ 0 workers →ReadWriteMany(explicit overrides)ReadWriteOnce+ 2 workers →ReadWriteOnce(explicit overrides)related to https://iguazio.atlassian.net/browse/IG4-1236