Skip to content

fix: remove default replicas value from MonoVertex/Vertex CRD - #3633

Open
nirajkumarbarot wants to merge 5 commits into
numaproj:mainfrom
nirajkumarbarot:fix/remove-replicas-default
Open

fix: remove default replicas value from MonoVertex/Vertex CRD#3633
nirajkumarbarot wants to merge 5 commits into
numaproj:mainfrom
nirajkumarbarot:fix/remove-replicas-default

Conversation

@nirajkumarbarot

Copy link
Copy Markdown

Problem

spec.replicas on MonoVertex/Vertex has a +kubebuilder:default=1 (and the same default baked into the generated CRD YAMLs, including the minimal variant). Since replicas is managed via the scale subresource by the autoscaler, this schema default causes ArgoCD to materialize a "desired" value of replicas: 1 even when the field is omitted from Git - leading to a false OutOfSync once the autoscaler updates the live value.

Fix

Removes the default from:

  • Go struct markers in vertex_types.go / monovertex_types.go
  • Generated CRD manifests in config/base/crds/full/
  • Generated CRD manifests in config/base/crds/minimal/

The controller already treats a nil/unset Replicas as 1 in Go (getReplicas() on both Vertex and MonoVertex), 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

@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.79%. Comparing base (8899b73) to head (2711259).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vigith

vigith commented Sep 4, 2026

Copy link
Copy Markdown
Member

please run make codegen and also make the DCO pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants