Sitelet https://github.com/kubernetes/kops/commit/4c2516f2044f090f612b4e63fd12b9c84e1d847d
Skip to content

Commit 4c2516f

Browse files
Merge pull request #18638 from krillerdk/hetzner-datacenter-removed-from-api
Update hcloud-go/v2 to latest version (v2.47.0)
2 parents 4adcad5 + 5e23610 commit 4c2516f

67 files changed

Lines changed: 4783 additions & 4154 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎go.mod‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ require (
5252
github.com/gophercloud/gophercloud/v2 v2.9.0
5353
github.com/hashicorp/go-sockaddr v1.0.7
5454
github.com/hashicorp/memberlist v0.5.4
55-
github.com/hetznercloud/hcloud-go/v2 v2.32.0
55+
github.com/hetznercloud/hcloud-go/v2 v2.47.0
5656
github.com/linode/linodego/v2 v2.4.1
5757
github.com/oklog/ulid/v2 v2.1.1
5858
github.com/pelletier/go-toml v1.9.5

‎go.sum‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@ github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+l
366366
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
367367
github.com/hashicorp/memberlist v0.5.4 h1:40YY+3qq2tAUhZIMEK8kqusKZBBjdwJ3NUjvYkcxh74=
368368
github.com/hashicorp/memberlist v0.5.4/go.mod h1:OgN6xiIo6RlHUWk+ALjP9e32xWCoQrsOCmHrWCm2MWA=
369-
github.com/hetznercloud/hcloud-go/v2 v2.32.0 h1:BRe+k7ESdYv3xQLBGdKUfk+XBFRJNGKzq70nJI24ciM=
370-
github.com/hetznercloud/hcloud-go/v2 v2.32.0/go.mod h1:hAanyyfn9M0cMmZ68CXzPCF54KRb9EXd8eiE2FHKGIE=
369+
github.com/hetznercloud/hcloud-go/v2 v2.47.0 h1:SI7C4cvdYReb2aHUEQ8KBMOqxNnmd4hOZti1SbPq3Qk=
370+
github.com/hetznercloud/hcloud-go/v2 v2.47.0/go.mod h1:pdG7fFGlYsCAaJ9r0QOIF0O6wQcpbJxT2VT8aP6XlIc=
371371
github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI=
372372
github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
373373
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=

‎protokube/pkg/protokube/hetzner_volume.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ func NewHetznerCloudProvider() (*HetznerCloudProvider, error) {
6363
}
6464

6565
klog.V(4).Infof("Found name of the running server: %q", server.Name)
66-
if server.Datacenter != nil && server.Datacenter.Location != nil {
67-
klog.V(4).Infof("Found location of the running server: %q", server.Datacenter.Location.Name)
66+
if server.Location != nil {
67+
klog.V(4).Infof("Found location of the running server: %q", server.Location.Name)
6868
} else {
6969
return nil, fmt.Errorf("failed to find location of the running server")
7070
}

‎upup/pkg/fi/cloudup/hetznertasks/servergroup.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func (v *ServerGroup) classifyServers(servers []*hcloud.Server, userDataHash str
108108
needUpdate = append(needUpdate, server.Name)
109109
continue
110110
}
111-
if server.Datacenter == nil || server.Datacenter.Location == nil || server.Datacenter.Location.Name != v.Location {
111+
if server.Location == nil || server.Location.Name != v.Location {
112112
needUpdate = append(needUpdate, server.Name)
113113
continue
114114
}

‎upup/pkg/fi/cloudup/hetznertasks/servergroup_test.go‎

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ func matchingServer(name string) *hcloud.Server {
5858
hetzner.TagClusterAutoscalerNodeGroup: testNodeGroup,
5959
hetzner.TagKubernetesInstanceUserData: testUserDataHash,
6060
},
61-
Datacenter: &hcloud.Datacenter{
62-
Location: &hcloud.Location{Name: testLocation},
63-
},
61+
Location: &hcloud.Location{Name: testLocation},
6462
ServerType: &hcloud.ServerType{Name: testSize},
6563
Image: &hcloud.Image{Name: testImage},
6664
PublicNet: hcloud.ServerPublicNet{
@@ -99,18 +97,7 @@ func TestClassifyServers(t *testing.T) {
9997
group: baseGroup(1),
10098
servers: func() []*hcloud.Server {
10199
s := matchingServer("s1")
102-
s.Datacenter.Location.Name = "nbg1"
103-
return []*hcloud.Server{s}
104-
}(),
105-
wantNeedUpdate: []string{"s1"},
106-
wantCount: 1,
107-
},
108-
{
109-
name: "nil datacenter marks needUpdate",
110-
group: baseGroup(1),
111-
servers: func() []*hcloud.Server {
112-
s := matchingServer("s1")
113-
s.Datacenter = nil
100+
s.Location.Name = "nbg1"
114101
return []*hcloud.Server{s}
115102
}(),
116103
wantNeedUpdate: []string{"s1"},

‎vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/action.go‎

Lines changed: 87 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/certificate.go‎

Lines changed: 20 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)