Skip to content
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

Merged
merged 1 commit into from
Jul 29, 2022

Conversation

hakman
Copy link
Member

@hakman hakman commented Jul 27, 2022

Follow-up to #14018.

/cc @justinsb @olemarkus

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. area/documentation area/provider/hetzner Issues or PRs related to Hetzner provider labels Jul 27, 2022
@hakman hakman force-pushed the hetzner_server_groups branch from 8caf80d to 39b203c Compare July 27, 2022 12:21
return fmt.Errorf("failed to stop server %q: %w", strconv.Itoa(id), err)
}

for i := 1; i <= 30; i++ {
Copy link
Member

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.

Copy link
Member Author

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) {
Copy link
Member

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
Copy link
Member

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.

@justinsb
Copy link
Member

This is nice!

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 29, 2022
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 29, 2022
@k8s-ci-robot k8s-ci-robot merged commit 7d40680 into kubernetes:master Jul 29, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.25 milestone Jul 29, 2022
@hakman hakman deleted the hetzner_server_groups branch July 29, 2022 12:59
k8s-ci-robot added a commit that referenced this pull request Jul 29, 2022
…14057-#14058-upstream-release-1.24

Automated cherry pick of #14034: Enable rolling updates for Hetzner
#14057: Wait for load balancer to be ready for Hetzner
#14058: Add multiple SSH keys support for Hetzner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/documentation area/provider/hetzner Issues or PRs related to Hetzner provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants