@@ -215,7 +215,7 @@ func (r *CLBBindingReconciler[T]) createListener(ctx context.Context, bd clbbind
215215 return binding , errors .WithStack (err )
216216 }
217217 if lis == nil { // 不存在,再次尝试创建
218- log .FromContext (ctx ).V ( 3 ). Info ("port check failed but no port exists, retry" , "listenerId" , lisId , "port" , binding .LoadbalancerPort , "protocol" , binding .Protocol , "lbId" , binding .LoadbalancerId )
218+ log .FromContext (ctx ).Info ("port check failed but no port exists, retry" , "listenerId" , lisId , "port" , binding .LoadbalancerPort , "protocol" , binding .Protocol , "lbId" , binding .LoadbalancerId )
219219 if lisId , err := createListener (); err != nil {
220220 return binding , errors .WithStack (err )
221221 } else { // 重试创建成功,记录最新的监听器 ID
@@ -280,12 +280,12 @@ func (r *CLBBindingReconciler[T]) ensureListener(ctx context.Context, bd clbbind
280280
281281 // 没有监听器 ID,尝试直接新建(不调查接口,加速大规模场景扩容速度)
282282 if binding .ListenerId == "" {
283- log .FromContext (ctx ).V (5 ).Info ("no listener id found, try to create listener" , "binding" , binding )
283+ log .FromContext (ctx ).V (1 ).Info ("no listener id found, try to create listener" , "binding" , binding )
284284 binding , err := r .createListener (ctx , bd , binding )
285285 if err != nil {
286286 return binding , errors .WithStack (err )
287287 }
288- log .FromContext (ctx ).V (5 ).Info ("listener first time created" , "binding" , binding )
288+ log .FromContext (ctx ).V (1 ).Info ("listener first time created" , "binding" , binding )
289289 return binding , nil
290290 }
291291
@@ -346,7 +346,7 @@ func (r *CLBBindingReconciler[T]) ensureBackendBindings(ctx context.Context, bd
346346 if err = r .ensureState (ctx , bd , networkingv1alpha1 .CLBBindingStateNoBackend ); err != nil {
347347 return errors .WithStack (err )
348348 }
349- log .FromContext (ctx ).V ( 5 ). Info ("not bind backend due to backend not found" )
349+ log .FromContext (ctx ).Info ("not bind backend due to backend not found" )
350350 needBind = false
351351 }
352352 // 其它错误,直接返回
@@ -360,7 +360,7 @@ func (r *CLBBindingReconciler[T]) ensureBackendBindings(ctx context.Context, bd
360360 if err = r .ensureState (ctx , bd , networkingv1alpha1 .CLBBindingStateWaitBackend ); err != nil {
361361 return errors .WithStack (err )
362362 }
363- log .FromContext (ctx ).V ( 5 ). Info ("not bind backend due to pod not scheduled" )
363+ log .FromContext (ctx ).Info ("not bind backend due to pod not scheduled" )
364364 needBind = false
365365 }
366366 return errors .WithStack (err )
@@ -380,7 +380,7 @@ func (r *CLBBindingReconciler[T]) ensureBackendBindings(ctx context.Context, bd
380380 return errors .WithStack (err )
381381 }
382382 }
383- log .FromContext (ctx ).V ( 5 ). Info ("not bind backend due to node type not supported" )
383+ log .FromContext (ctx ).Info ("not bind backend due to node type not supported" )
384384 needBind = false
385385 }
386386
@@ -390,7 +390,7 @@ func (r *CLBBindingReconciler[T]) ensureBackendBindings(ctx context.Context, bd
390390 if err = r .ensureState (ctx , bd , networkingv1alpha1 .CLBBindingStateWaitBackend ); err != nil {
391391 return errors .WithStack (err )
392392 }
393- log .FromContext (ctx ).V ( 5 ). Info ("not bind backend due to no pod ip" )
393+ log .FromContext (ctx ).Info ("not bind backend due to no pod ip" )
394394 needBind = false
395395 }
396396
@@ -588,7 +588,7 @@ func patchResult(ctx context.Context, c client.Client, obj client.Object, result
588588 if err := kube .PatchMap (ctx , c , obj , patchMap ); err != nil {
589589 return errors .WithStack (err )
590590 }
591- log .FromContext (ctx ).V (3 ).Info ("patch clb port mapping result success" , "value" , string (result ))
591+ log .FromContext (ctx ).V (1 ).Info ("patch clb port mapping result success" , "value" , string (result ))
592592 }
593593
594594 if ! clusterinfo .AgonesSupported { // 没安装 agones,不做后续处理
@@ -625,7 +625,7 @@ func patchResult(ctx context.Context, c client.Client, obj client.Object, result
625625 return errors .WithStack (err )
626626 }
627627 }
628- log .FromContext (ctx ).V (3 ).Info ("patch clb port mapping result to agones gameserver success" , "value" , string (result ))
628+ log .FromContext (ctx ).V (1 ).Info ("patch clb port mapping result to agones gameserver success" , "value" , string (result ))
629629 }
630630 return nil
631631}
@@ -898,13 +898,13 @@ func (r *CLBBindingReconciler[T]) cleanupPortBinding(ctx context.Context, bindin
898898 lis , err := clb .GetListenerByIdOrPort (ctx , binding .Region , binding .LoadbalancerId , binding .ListenerId , int64 (binding .LoadbalancerPort ), binding .Protocol )
899899 if err != nil {
900900 if clb .IsLoadBalancerNotExistsError (err ) { // 忽略 lbid 不存在的错误,就当清理成功
901- log .FromContext (ctx ).V (5 ).Info ("ignore cleanup due to lb not exists" , "binding" , binding )
901+ log .FromContext (ctx ).V (1 ).Info ("ignore cleanup due to lb not exists" , "binding" , binding )
902902 return nil
903903 }
904904 return errors .WithStack (err )
905905 }
906906 if lis == nil { // 监听器已删除,忽略
907- log .FromContext (ctx ).V (5 ).Info ("ignore cleanup due to listener already deleted" , "binding" , binding )
907+ log .FromContext (ctx ).V (1 ).Info ("ignore cleanup due to listener already deleted" , "binding" , binding )
908908 return nil
909909 }
910910 // 清理监听器
0 commit comments