fix: remove default replicas value from MonoVertex/Vertex CRD - #3633
Open
nirajkumarbarot wants to merge 5 commits into
Open
fix: remove default replicas value from MonoVertex/Vertex CRD#3633nirajkumarbarot wants to merge 5 commits into
nirajkumarbarot wants to merge 5 commits into
Conversation
nirajkumarbarot
requested review from
vigith,
whynowy and
yhl25
as code owners
September 4, 2026 19:12
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3633 +/- ##
==========================================
- Coverage 83.85% 83.79% -0.07%
==========================================
Files 313 313
Lines 84536 84536
==========================================
- Hits 70887 70835 -52
- Misses 13003 13058 +55
+ Partials 646 643 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
|
please run |
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.
Problem
spec.replicason MonoVertex/Vertex has a+kubebuilder:default=1(and the same default baked into the generated CRD YAMLs, including theminimalvariant). Since replicas is managed via the scale subresource by the autoscaler, this schema default causes ArgoCD to materialize a "desired" value ofreplicas: 1even when the field is omitted from Git - leading to a false OutOfSync once the autoscaler updates the live value.Fix
Removes the default from:
vertex_types.go/monovertex_types.goconfig/base/crds/full/config/base/crds/minimal/The controller already treats a
nil/unsetReplicasas1in Go (getReplicas()on bothVertexandMonoVertex), so removing the schema-level default doesn't change runtime behavior.Pipeline's CRD does not define its own
spec.replicas(each vertex's replica count is tracked on its own MonoVertex/Vertex object), so no changes were needed there.Discussed in #3585.
Related: #3576