@@ -169,7 +169,7 @@ func (s *Service) getOrCreateLoadBalancer(openStackCluster *infrav1.OpenStackClu
169
169
return lb , nil
170
170
}
171
171
172
- s .scope .Logger ().Info (fmt . Sprintf ( "Creating load balancer in subnet: %q" , subnetID ) , "name" , loadBalancerName )
172
+ s .scope .Logger ().Info ("Creating load balancer in subnet" , "subnetID" , subnetID , "name" , loadBalancerName )
173
173
174
174
lbCreateOpts := loadbalancers.CreateOpts {
175
175
Name : loadBalancerName ,
@@ -199,7 +199,7 @@ func (s *Service) getOrCreateListener(openStackCluster *infrav1.OpenStackCluster
199
199
return listener , nil
200
200
}
201
201
202
- s .scope .Logger ().Info ("Creating load balancer listener" , "name" , listenerName , "lb-id " , lbID )
202
+ s .scope .Logger ().Info ("Creating load balancer listener" , "name" , listenerName , "loadBalancerID " , lbID )
203
203
204
204
listenerCreateOpts := listeners.CreateOpts {
205
205
Name : listenerName ,
@@ -267,7 +267,7 @@ func (s *Service) getOrUpdateAllowedCIDRS(openStackCluster *infrav1.OpenStackClu
267
267
listener .AllowedCIDRs = capostrings .Unique (listener .AllowedCIDRs )
268
268
269
269
if ! reflect .DeepEqual (allowedCIDRs , listener .AllowedCIDRs ) {
270
- s .scope .Logger ().Info ("CIDRs do not match, start to update listener" , "expected CIDRs " , allowedCIDRs , "load balancer existing CIDR " , listener .AllowedCIDRs )
270
+ s .scope .Logger ().Info ("CIDRs do not match, updating listener" , "expectedCIDRs " , allowedCIDRs , "currentCIDRs " , listener .AllowedCIDRs )
271
271
listenerUpdateOpts := listeners.UpdateOpts {
272
272
AllowedCIDRs : & allowedCIDRs ,
273
273
}
@@ -316,7 +316,7 @@ func (s *Service) getOrCreatePool(openStackCluster *infrav1.OpenStackCluster, po
316
316
return pool , nil
317
317
}
318
318
319
- s .scope .Logger ().Info (fmt . Sprintf ( "Creating load balancer pool for listener %q" , listenerID ) , "name " , poolName , "lb-id " , lbID )
319
+ s .scope .Logger ().Info ("Creating load balancer pool for listener" , "loadBalancerID" , lbID , "listenerID " , listenerID , "name " , poolName )
320
320
321
321
method := pools .LBMethodRoundRobin
322
322
@@ -356,7 +356,7 @@ func (s *Service) getOrCreateMonitor(openStackCluster *infrav1.OpenStackCluster,
356
356
return nil
357
357
}
358
358
359
- s .scope .Logger ().Info (fmt . Sprintf ( "Creating load balancer monitor for pool %q" , poolID ) , "name" , monitorName , "lb-id " , lbID )
359
+ s .scope .Logger ().Info ("Creating load balancer monitor for pool" , "loadBalancerID" , lbID , "name" , monitorName , "poolID " , poolID )
360
360
361
361
monitorCreateOpts := monitors.CreateOpts {
362
362
Name : monitorName ,
@@ -400,7 +400,7 @@ func (s *Service) ReconcileLoadBalancerMember(openStackCluster *infrav1.OpenStac
400
400
}
401
401
402
402
loadBalancerName := getLoadBalancerName (clusterName )
403
- s .scope .Logger ().Info ("Reconciling load balancer member" , "name " , loadBalancerName )
403
+ s .scope .Logger ().Info ("Reconciling load balancer member" , "loadBalancerName " , loadBalancerName )
404
404
405
405
lbID := openStackCluster .Status .APIServerLoadBalancer .ID
406
406
portList := []int {int (openStackCluster .Spec .ControlPlaneEndpoint .Port )}
@@ -429,7 +429,7 @@ func (s *Service) ReconcileLoadBalancerMember(openStackCluster *infrav1.OpenStac
429
429
continue
430
430
}
431
431
432
- s .scope .Logger ().Info ("Deleting load balancer member ( because the IP of the machine changed) " , "name" , name )
432
+ s .scope .Logger ().Info ("Deleting load balancer member because the IP of the machine changed" , "name" , name )
433
433
434
434
// lb member changed so let's delete it so we can create it again with the correct IP
435
435
err = s .waitForLoadBalancerActive (lbID )
0 commit comments