Skip to content

Commit 3402db4

Browse files
Harsh ThakurRealHarshThakur
Harsh Thakur
authored andcommittedJul 15, 2022
Add region param during assign/unassign
Signed-off-by: Harsh Thakur <harsh@civo.com>
1 parent 92d9fcb commit 3402db4

File tree

9 files changed

+37
-10
lines changed

9 files changed

+37
-10
lines changed
 

‎cloud-controller-manager/civo/loadbalancer.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func (l *loadbalancer) updateLBConfig(civolb *civogo.LoadBalancer, service *v1.S
155155

156156
// this is so that we don't try to reassign the reserved IP to the loadbalancer
157157
if rip.AssignedTo.ID != civolb.ID {
158-
_, err = l.client.civoClient.AssignIP(rip.ID, civolb.ID, "loadbalancer")
158+
_, err = l.client.civoClient.AssignIP(rip.ID, civolb.ID, "loadbalancer", Region)
159159
if err != nil {
160160
klog.Errorf("Unable to assign reserved IP, error: %v", err)
161161
return nil, err
@@ -169,7 +169,7 @@ func (l *loadbalancer) updateLBConfig(civolb *civogo.LoadBalancer, service *v1.S
169169
}
170170

171171
if ip != nil {
172-
_, err = l.client.civoClient.UnassignIP(ip.ID)
172+
_, err = l.client.civoClient.UnassignIP(ip.ID, Region)
173173
if err != nil {
174174
klog.Errorf("Unable to unassign IP, error: %v", err)
175175
return nil, err

‎go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/civo/civo-cloud-controller-manager
33
go 1.16
44

55
require (
6-
github.com/civo/civogo v0.2.93
6+
github.com/civo/civogo v0.2.96
77
github.com/emicklei/go-restful v2.11.1+incompatible // indirect
88
github.com/go-openapi/swag v0.19.7 // indirect
99
github.com/google/go-cmp v0.5.6 // indirect

‎go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P
6969
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
7070
github.com/civo/civogo v0.2.93 h1:HE6p5K9yJ9+I1IlK70aMHHoBRn6VkmMQSnUAPPM+KOo=
7171
github.com/civo/civogo v0.2.93/go.mod h1:7+GeeFwc4AYTULaEshpT2vIcl3Qq8HPoxA17viX3l6g=
72+
github.com/civo/civogo v0.2.96 h1:GHaJ5PRH98psA4eBgQQxBGPp5OnWblbGWvL5S1vV1Gc=
73+
github.com/civo/civogo v0.2.96/go.mod h1:7+GeeFwc4AYTULaEshpT2vIcl3Qq8HPoxA17viX3l6g=
7274
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
7375
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y=
7476
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=

‎vendor/github.com/civo/civogo/fake_client.go

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎vendor/github.com/civo/civogo/instance.go

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎vendor/github.com/civo/civogo/ip.go

+11-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎vendor/github.com/civo/civogo/loadbalancer.go

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎vendor/github.com/civo/civogo/network.go

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎vendor/modules.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ github.com/beorn7/perks/quantile
1313
github.com/blang/semver
1414
# github.com/cespare/xxhash/v2 v2.1.1
1515
github.com/cespare/xxhash/v2
16-
# github.com/civo/civogo v0.2.93
16+
# github.com/civo/civogo v0.2.96
1717
## explicit
1818
github.com/civo/civogo
1919
github.com/civo/civogo/utils

0 commit comments

Comments
 (0)