Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: range reserveOrdinals for AdvancedStatefulSet #1873

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

AiRanthem
Copy link
Member

Ⅰ. Describe what this PR does

support range value like 1-5 to assign a lot of reserveOrdinals in AdvancedStatefulSet, which looks like:

apiVersion: apps.kruise.io/v1beta1
kind: StatefulSet
spec:
  # ...
  replicas: 4
  reserveOrdinals:
  - 1
  - 2-5 # <- SEE THIS

the example is the same as:

apiVersion: apps.kruise.io/v1beta1
kind: StatefulSet
spec:
  # ...
  replicas: 4
  reserveOrdinals:
  - 1
  - 2
  - 3
  - 4
  - 5

so you don't have to write a very long reserveOrdinals list.

Ⅱ. Does this pull request fix one issue?

fixes #1846

Ⅲ. Describe how to verify it

use the example above

Ⅳ. Special notes for reviews

Copy link

codecov bot commented Jan 2, 2025

Codecov Report

Attention: Patch coverage is 87.50000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 50.96%. Comparing base (0d0031a) to head (e60e0a5).
Report is 140 commits behind head on master.

Files with missing lines Patch % Lines
...sistentpodstate/persistent_pod_state_controller.go 50.00% 1 Missing ⚠️
pkg/util/controllerfinder/controller_finder.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1873      +/-   ##
==========================================
+ Coverage   47.91%   50.96%   +3.05%     
==========================================
  Files         162      192      +30     
  Lines       23491    24947    +1456     
==========================================
+ Hits        11256    12715    +1459     
+ Misses      11014    10927      -87     
- Partials     1221     1305      +84     
Flag Coverage Δ
unittests 50.96% <87.50%> (+3.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@AiRanthem AiRanthem self-assigned this Jan 3, 2025
@AiRanthem AiRanthem marked this pull request as ready for review January 3, 2025 02:56
@AiRanthem AiRanthem requested review from zmberg and furykerry January 3, 2025 03:46
@zmberg zmberg added this to the 1.9 milestone Jan 7, 2025
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.

[feature request] asts reserveOrdinals support range type
2 participants