rollout: Make maxNew configurable#4746
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Makes the per-reconcile “new BundleDeployment creation” limit configurable via bundle.spec.rolloutStrategy.maxNew, instead of being hard-coded to 50, addressing the need to stage large rollouts more conservatively (#3829).
Changes:
- Add
rolloutStrategy.maxNewto the Bundle API and CRDs (default 50). - Update rollout partitioning logic to use the configured maxNew when creating new BundleDeployments.
- Add unit tests covering the new maxNew behavior and status initialization.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/apis/fleet.cattle.io/v1alpha1/bundle_types.go | Adds RolloutStrategy.MaxNew and updates BundleStatus.MaxNew documentation. |
| pkg/apis/fleet.cattle.io/v1alpha1/zz_generated.deepcopy.go | Updates deepcopy generation for the new field. |
| internal/cmd/controller/target/partition.go | Applies maxNew limiting when creating new BundleDeployments. |
| internal/cmd/controller/target/rollout_test.go | Adds unit tests validating UpdatePartitions behavior with maxNew. |
| internal/cmd/controller/reconciler/bundle_status.go | Sets status.MaxNew from rollout strategy (with default). |
| internal/cmd/controller/reconciler/bundle_controller.go | Passes rollout strategy into resetStatus. |
| charts/fleet-crd/templates/crds.yaml | Updates CRD schema/docs to include rolloutStrategy.maxNew. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
thardeck
approved these changes
Mar 13, 2026
Collaborator
thardeck
left a comment
There was a problem hiding this comment.
lgtm, only needs formatting in target_test.go
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.
Refers to #3829
Additional Information
Checklist
fleet-product-docs repository.