-
Notifications
You must be signed in to change notification settings - Fork 773
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
cloneset partition support float percent #1124
cloneset partition support float percent #1124
Conversation
fixes #1038 |
0d11760
to
b6b0a36
Compare
input: intstr.FromString("90"), | ||
expectErr: true, | ||
}, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add 0.01% partition UT.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
pkg/util/tools.go
Outdated
} | ||
var value int | ||
if roundUp { | ||
value = int(math.Ceil(float64(v) * (float64(total)) / 100)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unconvert: unnecessary conversion
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
pkg/util/tools.go
Outdated
if roundUp { | ||
value = int(math.Ceil(float64(v) * (float64(total)) / 100)) | ||
} else { | ||
value = int(math.Floor(float64(v) * (float64(total)) / 100)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unconvert: unnecessary conversion
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
You should also update the |
b6b0a36
to
d466621
Compare
This is not partition feature, change it also? |
Signed-off-by: shiyan2016 <[email protected]>
d466621
to
b70995e
Compare
/lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: furykerry 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 |
Signed-off-by: peng.xin <[email protected]> optimize workloadspread when suitable subset maxReplicas is niil (openkruise#1066) Signed-off-by: mingzhou.swx <[email protected]> Signed-off-by: mingzhou.swx <[email protected]> Co-authored-by: mingzhou.swx <[email protected]> Optimize performance of LabelSelector conversion (openkruise#1068) Signed-off-by: FillZpp <[email protected]> Signed-off-by: FillZpp <[email protected]> Support timezone for AdvancedCronJob (openkruise#1070) Signed-off-by: FillZpp <[email protected]> Signed-off-by: FillZpp <[email protected]> ignore if pod condition has been updated (openkruise#1074) Signed-off-by: mingzhou.swx <[email protected]> Signed-off-by: mingzhou.swx <[email protected]> Co-authored-by: mingzhou.swx <[email protected]> pod probe marker apis (openkruise#1073) * pod probe marker apis Signed-off-by: liheng.zms <[email protected]> * fix statefulset truncateHistory panic Signed-off-by: liheng.zms <[email protected]> Signed-off-by: liheng.zms <[email protected]> pod probe marker controller (openkruise#1075) Signed-off-by: liheng.zms <[email protected]> Signed-off-by: liheng.zms <[email protected]> consider whether patch field is matched when assign existing pods to subset (openkruise#1083) Signed-off-by: mingzhou.swx <[email protected]> Signed-off-by: mingzhou.swx <[email protected]> Co-authored-by: mingzhou.swx <[email protected]> pod probe marker webhook (openkruise#1078) Signed-off-by: liheng.zms <[email protected]> Signed-off-by: liheng.zms <[email protected]> sidecarset support pods ns(kube-system, kube-public) (openkruise#1084) Signed-off-by: liheng.zms <[email protected]> Signed-off-by: liheng.zms <[email protected]> pod probe marker proposal (openkruise#1053) Signed-off-by: liheng.zms <[email protected]> Signed-off-by: liheng.zms <[email protected]> node pod probe daemon (openkruise#1077) Signed-off-by: liheng.zms <[email protected]> sidecarset support patch pod metadata proposal (openkruise#993) Signed-off-by: liheng.zms <[email protected]> Support predownload image in ads (openkruise#1057) Signed-off-by: Abner <[email protected]> * support predownload image for ads Add PreDownloadImageForDaemonSetUpdate featureGate (openkruise#1093) Signed-off-by: FillZpp <[email protected]> Signed-off-by: FillZpp <[email protected]> Add changelog for v1.3.0 (openkruise#1092) Signed-off-by: liheng.zms <[email protected]> Signed-off-by: liheng.zms <[email protected]> fix sidecarset inject annotations abnormal (openkruise#1101) Signed-off-by: liheng.zms <[email protected]> Signed-off-by: liheng.zms <[email protected]> fix InPlaceUpdateEnvFromMetadata bug (openkruise#1108) Co-authored-by: 郭已钦 <[email protected]> support uniteddeployment persistentVolumeClaimRetentionPolicy inherit from advancestatefulset template (openkruise#1110) Signed-off-by: cheyuexian <[email protected]> Signed-off-by: cheyuexian <[email protected]> Co-authored-by: cheyuexian <[email protected]> Add PreNormal Lifecycle Hook for CloneSet (openkruise#1071) * add pre-normal(pre-available) hook Signed-off-by: mingzhou.swx <[email protected]> * add pre-normal(pre-available) hook Signed-off-by: mingzhou.swx <[email protected]> Signed-off-by: mingzhou.swx <[email protected]> Co-authored-by: mingzhou.swx <[email protected]> partition support float percent (openkruise#1124) Signed-off-by: shiyan2016 <[email protected]> Signed-off-by: shiyan2016 <[email protected]> improve error hanlding of inplace update env from metadata (openkruise#1125) Signed-off-by: mingzhou.swx <[email protected]> Signed-off-by: mingzhou.swx <[email protected]> Co-authored-by: mingzhou.swx <[email protected]> pub support to configure Evict,Delete,Update Operation (openkruise#1126) Signed-off-by: liheng.zms <[email protected]> Signed-off-by: liheng.zms <[email protected]> feat: add watch whitelist feat: add watch whitelist add watch whitelist check add dynamic watch option feat: add persistent annotations format feat: add pps support custom workload Signed-off-by: peng.xin <[email protected]> fix: nodeSelector and nodeAffinity have not been modified Signed-off-by: peng.xin <[email protected]> fix: error string Signed-off-by: peng.xin <[email protected]> fix: error string Signed-off-by: peng.xin <[email protected]> fix: goimports Signed-off-by: peng.xin <[email protected]> refactor: refactoring ersistentPodAnnotations type Signed-off-by: peng.xin <[email protected]> - add statefulet group check - modify the pod create processing logic Signed-off-by: peng.xin <[email protected]> refactor: pps watch of whitelist workload Signed-off-by: peng.xin <[email protected]> fix: add statefulsetlike's pod controller Signed-off-by: peng.xin <[email protected]>
Ⅰ. Describe what this PR does
support float percent for cloneset partition to improve presicion
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how to verify it
Ⅳ. Special notes for reviews