refactor(operator): extract reusable DCD workload renderer - #12115
Closed
julienmancuso wants to merge 4 commits into
Closed
refactor(operator): extract reusable DCD workload renderer#12115julienmancuso wants to merge 4 commits into
julienmancuso wants to merge 4 commits into
Conversation
|
Contributor
WalkthroughChangesWorkload rendering centralization
Estimated code review effort: 4 (Complex) | ~45 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
Signed-off-by: Julien Mancuso <jmancuso@nvidia.com>
julienmancuso
force-pushed
the
jsm/12035-1
branch
from
July 24, 2026 20:29
df06acb to
dc5cb2b
Compare
Signed-off-by: Julien Mancuso <jmancuso@nvidia.com>
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
Extract DCD workload rendering from
DynamoComponentDeploymentReconcilerinto a concrete, reusabledcdWorkloadRenderer.Overview
Rendering pod templates and Services is not itself a controller state machine, but it was previously implemented as methods on the DCD reconciler. That forced another workload implementation to either duplicate DCD rendering logic or construct a reconciler solely to call its helpers.
This change introduces a narrow composition boundary:
The controller remains responsible for reconciliation, status, watches, finalizers, readiness, and composing the rendered templates into a concrete workload resource.
Details
The package-private
dcdWorkloadRendererreceives its dependencies explicitly:It centralizes the existing rendering behavior for:
DynamoComponentDeploymentReconcilerdelegates workload rendering directly to this renderer and composes the returned templates into its existing Deployment or LeaderWorkerSet resources. No public provider interface is introduced.The renderer deliberately preserves the existing checkpoint preparation and compatibility lookups. Separating stable-resource preparation and per-reconcile resolved state is deferred to later composition-first work.
Where should the reviewer start?
deploy/operator/internal/controller/dynamocomponentdeployment_renderer.godefines the extracted rendering boundary.deploy/operator/internal/controller/dynamocomponentdeployment_controller.goshows the controller delegating rendering and retaining reconciliation ownership.deploy/operator/internal/controller/dynamocomponentdeployment_controller_test.gochecks renderer/controller resource equivalence and existing compatibility behavior.Non-goals
This MR does not:
Compatibility
The refactor preserves:
Validation
Both Docker targets pass.
Related issues
Summary by CodeRabbit
Refactor
Bug Fixes