-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Give kOps CLI knowledge about ASG warm pools #11227
Conversation
9cfd739
to
69ef5bf
Compare
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.
This capping of maxSurge
kops/pkg/instancegroups/instancegroups.go
Lines 111 to 113 in ab1b858
if maxSurge > len(update) { | |
maxSurge = len(update) | |
} |
needs to ignore warm instances in update
, otherwise rolling update could end up detaching warm instances.
cmd/kops/get_instances.go
Outdated
return string(i.State) | ||
}) | ||
|
||
columns := []string{"ID", "NODE-NAME", "STATUS", "ROLES", "INTERNAL-IP", "INSTANCE-GROUP", "MACHINE-TYPE", "STATE"} |
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 state should come after either status or roles. It's more important that machine type at least.
nodeup/pkg/model/kubelet.go
Outdated
@@ -293,6 +293,11 @@ func (b *KubeletBuilder) buildSystemdService() *nodetasks.Service { | |||
|
|||
service.InitDefaults() | |||
|
|||
if b.ConfigurationMode == "Warming" { | |||
|
|||
service.Running = fi.Bool(false) |
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.
Shouldn't we add a test to verify this behavior?
upup/pkg/fi/nodeup/command.go
Outdated
@@ -669,12 +669,15 @@ func getNodeConfigFromServer(ctx context.Context, config *nodeup.ConfigServerOpt | |||
} | |||
|
|||
func getAWSConfigurationMode(c *model.NodeupModelContext) (string, error) { | |||
<<<<<<< HEAD |
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.
Could you squash these out of the commit stream?
pkg/instancegroups/instancegroups.go
Outdated
klog.Infof("waiting for %v after terminating instance", sleepAfterTerminate) | ||
time.Sleep(sleepAfterTerminate) | ||
} else { | ||
klog.Infof("%q is in the warm pool. Not sleeping", u.ID) |
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 don't think there's a need to log anything here.
In |
@johngmyers you were right. there were dragons in my previous approach. Now I am a bit more brutish and just iterate over all the warmpool nodes and quickly terminate them immediately in the beginning. |
I like simple. |
/retest |
/hold cancel |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hakman 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 |
/test pull-kops-e2e-kubernetes-aws |
/test pull-kops-e2e-k8s-containerd |
/test all |
/retest |
2 similar comments
/retest |
/retest |
kops get instances
mark warm pool nodesBased on #11216
/hold