-
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
Support the kops.k8s.io/needs-update annotation on nodes #8272
Support the kops.k8s.io/needs-update annotation on nodes #8272
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 |
/retest |
2 similar comments
/retest |
/retest |
// AdjustNeedUpdate adjusts the set of instances that need updating, using factors outside those known by the cloud implementation | ||
func (c *RollingUpdateCluster) AdjustNeedUpdate(groups map[string]*cloudinstances.CloudInstanceGroup, cluster *api.Cluster, instanceGroups *api.InstanceGroupList) error { | ||
for _, group := range groups { | ||
if group.Ready != 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.
FYI for reads golang treats a nil slice as empty, so I don't think you actually need this check. Arguably it does make things clearer though!
var newReady []*cloudinstances.CloudInstanceGroupMember | ||
for _, member := range group.Ready { | ||
makeNotReady := false | ||
if member.Node != nil && member.Node.Annotations != 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.
(And FYI the same applies to nil maps, for reading - though not for writing, so again you don't need the Annotations != nil check)
A tip about nil slices & maps, but this LGTM. Thanks @johngmyers Unfortunately I think we've conflicted on a doc file, so I suspect I'll need to re-apply lgtm. /approve |
9139f34
to
33e2316
Compare
Thanks for rebasing! /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 support for an annotation that nominates nodes for replacement by the kops rolling update mechanism. Possible uses would be external controllers to limit the age of nodes (ref #7411) or to remove unhealthy but still functioning nodes. By having the replacement performed by kops rolling update, it would necessarily coordinate with kops rolling updates and use kops's configured strategy, for example surging when we implement it.
/kind feature
/area rolling-update