-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Option to increase concurrency of rolling update within instancegroup #8271
Conversation
Hi @johngmyers. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/ok-to-test |
f9ea0cf
to
0c3651c
Compare
/retest |
Looks like my tests are a little flaky. Perhaps a GC is getting in and throwing off the timings. I will investigate. |
/test pull-kops-verify-boilerplate |
/retest |
unavailable, err := intstr.GetValueFromIntOrPercent(rollingUpdate.MaxUnavailable, numInstances, false) | ||
if err != nil { | ||
// If unparseable use the default value | ||
unavailable = 1 |
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.
Nit: we might want to log a warning here. Ideally we would have already caught this in validation though.
} { | ||
t.Run(tc.name, func(t *testing.T) { | ||
defaultCluster := &kops.RollingUpdate{} | ||
setFieldValue(defaultCluster, tc.name, tc.defaultValue) |
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.
I think I know where this is going... it is usually easier and clearer just to write it out, but ... let's see once the chain lands!
} else if rollingUpdateData.CloudOnly { | ||
if maxConcurrency == 0 { | ||
klog.Infof("Rolling updates for InstanceGroup %s are disabled", r.CloudGroup.InstanceGroup.Name) | ||
return nil |
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.
Should we return an error here (as we did not update the IG)?
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.
We want to continue to update the subsequent instancegroups. The admin specifically wanted to have kops skip this instancegroup, so it isn't an error.
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.
One issue here is the placement. Where it is currently it will validate and taint before returning. Should this be moved up before the initial validation?
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.
I may be misunderstanding, but I think you're saying that maxUnavailable: 0
means "skip this IG for rolling updates". I'm not sure I follow that implication, but I also don't know what maxUnavailable: 0
would mean!
Is maxUnavailable: 0
something you're actually using? Because we could just treat it as a validation error until we have maxSurge support (I guess that maxUnavailable=0 and maxSurge=0 is a validation error on a Deployment?)
I'm not overly worry about the tainting, TBH, given that!
LGTM in general, a few nits if you agree with them, but the only two I'd like to reach resolution on now is whether we should pass the channel in to |
bfa3bea
to
ec66fea
Compare
ec66fea
to
dcdf08c
Compare
/test pull-kops-e2e-kubernetes-aws |
Thanks for the tweaks @johngmyers - this LGTM. I do wonder if we should just make /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: johngmyers, justinsb 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 |
Adds a
RollingUpdate
field to instancegroup and cluster for configuring the rolling update strategy. Starts withMaxUnavailable
, mostly cribbed from machine-api'sMachineDeployment
. UnlikeMachineDeployment
, permits disabling rolling updates for an instancegroup./kind feature
/area rolling-update
Fixes #1718, #7685