[controller] Astef prototype enlarge our rsc controller#525
Open
IvanOgurchenok wants to merge 5 commits into
Open
[controller] Astef prototype enlarge our rsc controller#525IvanOgurchenok wants to merge 5 commits into
IvanOgurchenok wants to merge 5 commits into
Conversation
IvanOgurchenok
marked this pull request as ready for review
January 23, 2026 13:58
IvanOgurchenok
force-pushed
the
astef-prototype-enlarge-our-rsc-controller
branch
from
January 25, 2026 23:21
f041f5d to
7cbf220
Compare
IvanOgurchenok
force-pushed
the
astef-prototype-enlarge-our-rsc-controller
branch
from
February 2, 2026 00:56
a003467 to
ea874cd
Compare
…ions support Introduce ReplicatedVolumeOperation (RVO) API for managing rolling configuration updates and eligible nodes conflict resolution. API changes: - Add ReplicatedVolumeOperation type with Spec (Type, ReplicatedVolumeName, ResolveEligibleNodesConflict) and Status (Conditions) - Add RollingOperationsCursor and SortSalt to ReplicatedStorageClassStatus - Add LastOperation field to ReplicatedVolumeStatus for UI observability - Add RSCRVOLockFinalizer and OperationCursorLabelKey constants RSC controller changes: - Add RVO watch with predicates (Completed condition changes) - Add RVO indexes (by RSC owner ref, by RV owner ref) - Implement selectTargetRollingOperations with filter-before-compute optimization (reduces hash computations from O(N) to O(C)) - Implement round-robin cursor-based volume selection with budget limits - Add removeRVOLockFinalizers for cleanup when cursor advances - Add defensive check for empty cursor label (migration safety) Performance: - Add go-performance-patterns.mdc rule with Schwartzian transform and filter-before-compute patterns Tests: - Add 36 new unit tests for rolling operations logic Signed-off-by: Ivan Ogurchenok <ivan.ogurchenok@flant.com>
- Remove OperationCursorLabelKey, parse cursor from RVO name - Rename SortSalt to RollingOperationsSortSalt in RSC status - Remove LastOperation from ReplicatedVolume (single owner principle) - Add MaxLength validation: rollingOperationsSortSalt=8, cursor=16 - Refactor RVO spec: ResolveEligibleNodesConflict → UpdateConfigOptions - Move name suffix constants from public API to controller (internal) - Fix cursor hash from 32-bit to 64-bit to avoid collisions at scale - Simplify parseRVOCursor to use last segment after "-" Signed-off-by: Ivan Ogurchenok <ivan.ogurchenok@flant.com>
add usage for list UnsafeDeepCopy, make wrapper for avoid strith usage, we got full copy only if need to modify Signed-off-by: Ivan Ogurchenok <ivan.ogurchenok@flant.com>
Signed-off-by: Ivan Ogurchenok <ivan.ogurchenok@flant.com>
- Refactor selectTargetRollingOperations → pure computeTargetRollingOperations (move salt generation and cursor mutation to ensureRollingOperations) - Extract applyRollingOperationsCursor helper for cursor updates - Rename removeRVOLockFinalizers → patchCompletedRVOsRemoveFinalizer (align with patchScheduledReplicas batch patch naming convention) - Remove accidental patchStrategy:"merge" on Datamesh field (rebase artifact) Signed-off-by: Ivan Ogurchenok <ivan.ogurchenok@flant.com>
IvanOgurchenok
force-pushed
the
astef-prototype-enlarge-our-rsc-controller
branch
from
February 9, 2026 22:39
ea874cd to
ce8b89a
Compare
astef
force-pushed
the
astef-prototype
branch
from
February 19, 2026 08:08
020a126 to
2c75d18
Compare
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.
Description
Add
ReplicatedVolumeOperation(RVO) API and rolling operations support to RSC controller.API changes:
ReplicatedVolumeOperationCRD for tracking rolling updatesReplicatedStorageClassStatus:SortSalt,RollingOperationsCursorLastOperationfield inReplicatedVolumeStatusfor UI observabilityController changes:
maxParallel) control concurrent operationsDoes not restart any critical cluster components.
Why do we need it, and what problem does it solve?
When
ReplicatedStorageClassconfiguration changes (e.g., topology, replication mode) or eligible nodes list changes, existing volumes need to be updated to match the new configuration.Previously, there was no mechanism to:
This PR adds the foundation for controlled rolling updates with:
RollingUpdatestrategy — gradually apply changes to existing volumesRollingRepairstrategy — automatically fix eligible nodes conflictsmaxParallelsettingWhat is the expected result?
After applying:
New CRD available:
kubectl get crd replicatedvolumeoperations.storage.deckhouse.ioRVO objects created when RSC has
ConfigurationRolloutStrategy: RollingUpdateorEligibleNodesConflictResolutionStrategy: RollingRepairand volumes need updates:kubectl get rvoRSC status shows rolling state:
status.sortSalt— random value for deterministic orderingstatus.rollingOperationsCursor— tracks progressConditions reflect rollout status:
ConfigurationRolledOut: Falsewith reasonConfigurationRolloutInProgressVolumesSatisfyEligibleNodes: Falsewith reasonConflictResolutionInProgressNote: RVO objects are created but not processed yet — a separate RVO controller (future PR) will handle the actual volume updates.
Checklist