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

feat: add lifecycle preNormal for asts #1141

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wkai886
Copy link

@wkai886 wkai886 commented Dec 12, 2022

Ⅰ. Describe what this PR does

add lifecycle preNormal for asts

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

@kruise-bot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign fillzpp for approval by writing /assign @fillzpp in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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
Copy link

Welcome @wkai886! It looks like this is your first PR to openkruise/kruise 🎉

@kruise-bot kruise-bot added the size/S size/S 10-29 label Dec 12, 2022
@@ -527,7 +527,12 @@
}
}

lifecycle.SetPodLifecycle(appspub.LifecycleStateNormal)(replicas[i])
if set.Spec.Lifecycle != nil && set.Spec.Lifecycle.PreNormal != nil && lifecycle.IsPodAllHooked(set.Spec.Lifecycle.PreNormal, replicas[i]) {
Copy link

Choose a reason for hiding this comment

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

gofmt: File is not gofmt-ed with -s


ℹ️ 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 ]

@@ -832,6 +837,12 @@ func (ssc *defaultStatefulSetControl) refreshPodState(set *appsv1beta1.StatefulS

var state appspub.LifecycleStateType
switch lifecycle.GetPodLifecycleState(pod) {
case appspub.LifecycleStatePreparingNormal:
Copy link
Member

@veophi veophi Dec 12, 2022

Choose a reason for hiding this comment

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

@wkai886 There are two things we need to consider further:

  1. This state transition is invoked after successfully scaling. Assuming that the scale is stuck, this transition will also be stuck. Is it reasonable?

  2. If a pod-x has not entered Normal state yet after creating, should we continue to create pod-x+1 if scalingMaxUnavailable=1?

@zmberg zmberg added this to In progress in Roadmap via automation Jan 5, 2023
@kruise-bot
Copy link

@wkai886: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@zmberg zmberg modified the milestone: 1.15 Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Roadmap
  
In progress
Development

Successfully merging this pull request may close these issues.

None yet

4 participants