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

Workloadspread support statefulset #1056

Merged
merged 1 commit into from
Aug 18, 2022

Conversation

veophi
Copy link
Member

@veophi veophi commented Aug 12, 2022

Signed-off-by: mingzhou.swx mingzhou.swx@alibaba-inc.com

Ⅰ. Describe what this PR does

StatefulSet has special logic about pod assignment for subsets. For example, suppose that we have the following sub sets config:

subsets:
- name: subset-a
  maxReplicas: 5
- name: subset-b
  maxReplicas: 5
- name: subset-c

the pods with order within [0, 5) will be assigned to subset-a;
the pods with order within [5, 10) will be assigned to subset-b;
the pods with order within [10, inf) will be assigned to subset-c.

Note:

  1. DO NOT SUPPORT set percentage as subset[x].maxReplicas for all StatefulSet;
  2. DO NOT SUPPORT reserveOrdinals feature for Advanced StatefulSet;

@kruise-bot kruise-bot added the size/L size/L: 100-499 label Aug 12, 2022
@codecov-commenter
Copy link

codecov-commenter commented Aug 12, 2022

Codecov Report

Merging #1056 (dd622ea) into master (4263a74) will decrease coverage by 0.27%.
The diff coverage is 20.86%.

❗ Current head dd622ea differs from pull request most recent head e323d36. Consider uploading reports for the commit e323d36 to get more accurate results

@@            Coverage Diff             @@
##           master    #1056      +/-   ##
==========================================
- Coverage   49.30%   49.02%   -0.28%     
==========================================
  Files         125      125              
  Lines       12355    12466     +111     
==========================================
+ Hits         6092     6112      +20     
- Misses       5322     5412      +90     
- Partials      941      942       +1     
Flag Coverage Δ
unittests 49.02% <20.86%> (-0.28%) ⬇️

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

Impacted Files Coverage Δ
...loadspread/validating/workloadspread_validation.go 71.91% <0.00%> (-2.56%) ⬇️
...ler/workloadspread/workloadspread_event_handler.go 54.95% <16.66%> (-6.67%) ⬇️
pkg/util/workloadspread/workloadspread.go 50.26% <19.44%> (-11.69%) ⬇️
...troller/workloadspread/update_pod_deletion_cost.go 63.41% <57.14%> (-0.59%) ⬇️
...roller/workloadspread/workloadspread_controller.go 62.72% <100.00%> (ø)
pkg/control/sidecarcontrol/sidecarset_control.go 36.00% <0.00%> (-0.64%) ⬇️
pkg/webhook/pod/mutating/sidecarset.go 63.71% <0.00%> (+0.20%) ⬆️
pkg/controller/sidecarset/sidecarset_processor.go 65.66% <0.00%> (+0.26%) ⬆️
pkg/control/sidecarcontrol/util.go 54.92% <0.00%> (+1.59%) ⬆️
pkg/controller/cloneset/cloneset_status.go 90.00% <0.00%> (+5.00%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@veophi veophi force-pushed the ws-support-sts branch 3 times, most recently from 177dc30 to 7c0e3de Compare August 16, 2022 03:19
@kruise-bot kruise-bot added size/XL size/XL: 500-999 and removed size/L size/L: 100-499 labels Aug 16, 2022
@veophi veophi force-pushed the ws-support-sts branch 6 times, most recently from e323d36 to 3f15da2 Compare August 16, 2022 07:15
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
@kruise-bot kruise-bot added size/XXL and removed size/XL size/XL: 500-999 labels Aug 17, 2022
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

@FillZpp
Copy link
Member

FillZpp commented Aug 18, 2022

/approve

@kruise-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: FillZpp

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kruise-bot kruise-bot merged commit daaf16d into openkruise:master Aug 18, 2022
diannaowa pushed a commit to diannaowa/kruise that referenced this pull request Sep 14, 2022
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>

Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
ppbits pushed a commit to ppbits/kruise that referenced this pull request Apr 4, 2024
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants