-
Notifications
You must be signed in to change notification settings - Fork 768
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
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
Welcome @wkai886! It looks like this is your first PR to openkruise/kruise 🎉 |
@@ -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]) { |
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.
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: |
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.
@wkai886 There are two things we need to consider further:
-
This state transition is invoked after successfully scaling. Assuming that the scale is stuck, this transition will also be stuck. Is it reasonable?
-
If a pod-
x
has not entered Normal state yet after creating, should we continue to create pod-x+1
ifscalingMaxUnavailable=1
?
@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. |
Ⅰ. 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