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 customized workload #1286

Merged
merged 1 commit into from
May 23, 2023

Conversation

veophi
Copy link
Member

@veophi veophi commented May 16, 2023

Ⅰ. Describe what this PR does

Require scale sub-resource support for customized workload

Ⅱ. Does this pull request fix one issue?

@kruise-bot kruise-bot added the size/XL size/XL: 500-999 label May 16, 2023
@veophi veophi force-pushed the feature/ws-support-crd branch 2 times, most recently from 9f1b7d6 to a60cdad Compare May 16, 2023 09:04
@codecov-commenter
Copy link

codecov-commenter commented May 16, 2023

Codecov Report

Merging #1286 (206180e) into master (ccd94b2) will decrease coverage by 0.01%.
The diff coverage is 38.09%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master    #1286      +/-   ##
==========================================
- Coverage   48.53%   48.53%   -0.01%     
==========================================
  Files         149      149              
  Lines       20616    20719     +103     
==========================================
+ Hits        10007    10055      +48     
- Misses       9514     9565      +51     
- Partials     1095     1099       +4     
Flag Coverage Δ
unittests 48.53% <38.09%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...sistentpodstate/persistent_pod_state_controller.go 31.18% <0.00%> (ø)
...tentpodstate/persistent_pod_state_event_handler.go 0.00% <0.00%> (ø)
...ler/workloadspread/workloadspread_event_handler.go 64.02% <0.00%> (-15.53%) ⬇️
...roller/workloadspread/workloadspread_controller.go 62.73% <9.09%> (-0.79%) ⬇️
...loadspread/validating/workloadspread_validation.go 74.42% <14.28%> (-3.94%) ⬇️
pkg/util/workloadspread/workloadspread.go 64.11% <66.66%> (+3.73%) ⬆️
...ate/validating/persistent_create_update_handler.go 59.77% <100.00%> (ø)
pkg/webhook/pod/mutating/persistent_pod_state.go 64.21% <100.00%> (ø)

... and 3 files with indirect coverage changes

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

pkg/util/client/client.go Outdated Show resolved Hide resolved
pkg/util/configuration/types.go Outdated Show resolved Hide resolved
}

if labelSelector != nil && len(matchedPods) == 0 { // try again using label selector for scale sub-resource
Copy link
Member

Choose a reason for hiding this comment

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

why retry using the pod label selector ? plz comment about the cases

Copy link
Member Author

Choose a reason for hiding this comment

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

done

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

// For such workloads like Deployment that do not manage the Pods directly,
// Pods' ownerReferences do not contain the workload, so we have to retry
Copy link
Member

Choose a reason for hiding this comment

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

Deployment is not a good example since Deployment pods can be listed using replicas from replicaset

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
Copy link
Member

zmberg commented May 23, 2023

/approve

@kruise-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zmberg

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 95e42f3 into openkruise:master May 23, 2023
diannaowa pushed a commit to diannaowa/kruise that referenced this pull request Jun 2, 2023
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
diannaowa pushed a commit to diannaowa/kruise that referenced this pull request Jun 2, 2023
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
@zmberg zmberg added this to the v1.5 milestone Jun 8, 2023
@zmberg zmberg added this to In progress in Roadmap via automation Jun 8, 2023
@zmberg zmberg moved this from In progress to Done in Roadmap Jun 8, 2023
diannaowa pushed a commit to diannaowa/kruise that referenced this pull request Aug 29, 2023
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
lilongfeng0902 pushed a commit to lilongfeng0902/kruise that referenced this pull request Sep 12, 2023
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.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
Labels
Projects
Roadmap
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants