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

Merged

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 96.15385% with 2 lines in your changes missing coverage. Please review.

Project coverage is 42.54%. Comparing base (2a29285) to head (58ffbc1).
Report is 2 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   42.45%   42.54%   +0.08%     
==========================================
  Files         312      313       +1     
  Lines       31328    31364      +36     
==========================================
+ Hits        13301    13343      +42     
+ Misses      16657    16652       -5     
+ Partials     1370     1369       -1     
Flag Coverage Δ
unittests 42.54% <96.15%> (+0.08%) ⬆️

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
@AiRanthem AiRanthem force-pushed the feature/asts-range-reserveordinals-250102 branch from e60e0a5 to 58ffbc1 Compare February 10, 2025 07:17
Copy link
Member

@furykerry furykerry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@zmberg zmberg merged commit 8f727a4 into openkruise:master Feb 12, 2025
53 of 54 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.

[feature request] asts reserveOrdinals support range type
3 participants