Skip to content

Commit 23e376a

Browse files
committed
some fixes
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
1 parent 322db5c commit 23e376a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

scaleway/cloud.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,19 +135,19 @@ func (c *cloud) Initialize(clientBuilder cloudprovider.ControllerClientBuilder,
135135
}
136136

137137
func (c *cloud) LoadBalancer() (cloudprovider.LoadBalancer, bool) {
138-
return c.loadbalancers, true
138+
return c.loadbalancers, c.loadbalancers != nil
139139
}
140140

141141
func (c *cloud) Instances() (cloudprovider.Instances, bool) {
142-
return c.instances, true
142+
return c.instances, c.instances != nil
143143
}
144144

145145
func (c *cloud) InstancesV2() (cloudprovider.InstancesV2, bool) {
146-
return c.instancesV2, true
146+
return c.instancesV2, c.instancesV2 != nil
147147
}
148148

149149
func (c *cloud) Zones() (cloudprovider.Zones, bool) {
150-
return c.zones, true
150+
return c.zones, c.zones != nil
151151
}
152152

153153
// clusters is not implemented

scaleway/loadbalancers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ func (l *loadbalancers) createLoadBalancer(ctx context.Context, clusterName stri
480480
lbName := l.GetLoadBalancerName(ctx, clusterName, service)
481481

482482
lbType := getLoadBalancerType(service)
483-
if lbType != "" {
483+
if lbType == "" {
484484
lbType = l.defaultLBType
485485
}
486486

0 commit comments

Comments
 (0)