@@ -52,7 +52,7 @@ type RBGracefulEvictionController struct {
52
52
// The Controller will requeue the Request to be processed again if an error is non-nil or
53
53
// Result.Requeue is true, otherwise upon completion it will remove the work from the queue.
54
54
func (c * RBGracefulEvictionController ) Reconcile (ctx context.Context , req controllerruntime.Request ) (controllerruntime.Result , error ) {
55
- klog .V (4 ).Infof ("Reconciling ResourceBinding %s." , req .NamespacedName . String () )
55
+ klog .V (4 ).InfoS ("Reconciling ResourceBinding" , "namespace" , req . Namespace , "name" , req .Name )
56
56
57
57
binding := & workv1alpha2.ResourceBinding {}
58
58
if err := c .Client .Get (ctx , req .NamespacedName , binding ); err != nil {
@@ -71,7 +71,7 @@ func (c *RBGracefulEvictionController) Reconcile(ctx context.Context, req contro
71
71
return controllerruntime.Result {}, err
72
72
}
73
73
if retryDuration > 0 {
74
- klog .V (4 ).Infof ("Retry to evict task after %v minutes. " , retryDuration .Minutes ())
74
+ klog .V (4 ).InfoS ("Retry to evict task after minutes" , "retryAfterMinutes " , retryDuration .Minutes ())
75
75
return controllerruntime.Result {RequeueAfter : retryDuration }, nil
76
76
}
77
77
return controllerruntime.Result {}, nil
@@ -97,8 +97,8 @@ func (c *RBGracefulEvictionController) syncBinding(ctx context.Context, binding
97
97
}
98
98
99
99
for _ , cluster := range evictedCluster {
100
- klog .V (2 ).Infof ( "Success to evict Cluster(%s) from ResourceBinding(%s/%s) gracefulEvictionTasks" ,
101
- cluster , binding .Namespace , binding .Name )
100
+ klog .V (2 ).InfoS ( "Evicted cluster from ResourceBinding gracefulEvictionTasks", "cluster" , cluster ,
101
+ "namespace" , binding .Namespace , "name" , binding .Name )
102
102
helper .EmitClusterEvictionEventForResourceBinding (binding , cluster , c .EventRecorder , err )
103
103
}
104
104
return nextRetry (keptTask , c .GracefulEvictionTimeout , metav1 .Now ().Time ), nil
0 commit comments