-
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
Enable rolling updates for Hetzner #14034
Conversation
8caf80d
to
39b203c
Compare
return fmt.Errorf("failed to stop server %q: %w", strconv.Itoa(id), err) | ||
} | ||
|
||
for i := 1; i <= 30; 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.
Might want to log if we gave up on waiting for a clean shutdown here.
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.
Good point. Added on my TODO list.
} | ||
|
||
// findServerGroups finds all server groups belonging to the cluster | ||
func findServerGroups(c *hetznerCloudImplementation, clusterName string) (map[string][]*hcloud.Server, 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.
Nit: if you're only calling this from GetCloudGroups, I think you could pass the instancegroups in and directly match the instancegroups, instead of constructing the magic string (?)
Labels: server.Labels, | ||
}) | ||
if err != nil { | ||
return err |
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: when we get an error from calling the hetzner API (or any API), I don't know how good those errors are. It might be nice to fmt.Errorf("error setting needs-update label on %q: %w", serverName, err)
for example.
This is nice! /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 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 |
Follow-up to #14018.
/cc @justinsb @olemarkus