File tree Expand file tree Collapse file tree
pkg/liqo-controller-manager/networking/external-network/client-operator Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -301,20 +301,16 @@ func (r *ClientReconciler) SetupWithManager(mgr ctrl.Manager) error {
301301}
302302
303303func (r * ClientReconciler ) ensurePortsCoherence (ctx context.Context , gw * networkingv1beta1.GatewayClient ) (bool , error ) {
304-
305304 if len (gw .Spec .Endpoint .Ports ) > 0 && gw .Spec .Endpoint .Port == gw .Spec .Endpoint .Ports [0 ] {
306305 return false , nil
307306 }
308307
309308 switch {
310309 case gw .Spec .Endpoint .Port != 0 && len (gw .Spec .Endpoint .Ports ) == 0 :
311-
312310 gw .Spec .Endpoint .Ports = []int32 {gw .Spec .Endpoint .Port }
313311 case len (gw .Spec .Endpoint .Ports ) > 0 :
314-
315312 gw .Spec .Endpoint .Port = gw .Spec .Endpoint .Ports [0 ]
316313 default :
317-
318314 gw .Spec .Endpoint .Port = int32 (forge .DefaultGwServerPort )
319315 gw .Spec .Endpoint .Ports = []int32 {forge .DefaultGwServerPort }
320316 }
You can’t perform that action at this time.
0 commit comments