Skip to content

bugfix: validate maxReplica when minReplica is set for autoscaler#4215

Merged
swiatekm merged 2 commits intoopen-telemetry:mainfrom
carsontham:bugfix/autoscaler-maxreplica-check
Jul 25, 2025
Merged

bugfix: validate maxReplica when minReplica is set for autoscaler#4215
swiatekm merged 2 commits intoopen-telemetry:mainfrom
carsontham:bugfix/autoscaler-maxreplica-check

Conversation

@carsontham
Copy link
Copy Markdown
Member

Description:

bugfix - added a validation check when minReplica is set but maxReplica is not. This returns an error and does not allow the number of replicas to be updated.

Link to tracking Issue(s):

Testing:

  • added unit test for this change
  • also tested the fix locally, by trying to update autoscaler without maxReplica when minReplica is set:
error: opentelemetrycollectors.opentelemetry.io "simplest" could not be patched: admission webhook "vopentelemetrycollectorcreateupdatebeta.kb.io" denied the request: spec.maxReplica must be set when spec.minReplica is set

Documentation:

Signed-off-by: carsontham <carsontham@outlook.com>
@carsontham carsontham requested a review from a team as a code owner July 24, 2025 08:48
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 24, 2025

E2E Test Results

 33 files  ±0  221 suites  ±0   3h 44m 7s ⏱️ - 22m 14s
 85 tests ±0   85 ✅ ±0  0 💤 ±0  0 ❌ ±0 
225 runs  ±0  225 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 248da5f. ± Comparison against base commit c5dd81b.

♻️ This comment has been updated with latest results.

@swiatekm swiatekm merged commit 3fbba09 into open-telemetry:main Jul 25, 2025
82 of 84 checks passed
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.

Setting only autoscaler.minReplicas without maxReplicas results in an attempt to create an HPA with maxReplicas = 0

3 participants