File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
components/node-labeler/cmd Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,10 @@ type PodReconciler struct {
138
138
139
139
func (r * PodReconciler ) Reconcile (ctx context.Context , req reconcile.Request ) (reconcile.Result , error ) {
140
140
log .WithField ("pod" , req .Name ).Info ("reconciling..." )
141
+ startTime := time .Now ()
142
+ defer func () {
143
+ log .WithField ("pod" , req .Name ).Infof ("reconciling took %vs" , time .Since (startTime ).Seconds ())
144
+ }()
141
145
142
146
var pod corev1.Pod
143
147
err := r .Get (ctx , req .NamespacedName , & pod )
@@ -209,6 +213,7 @@ func (r *PodReconciler) Reconcile(ctx context.Context, req reconcile.Request) (r
209
213
210
214
if labelValue , exists := node .Labels [labelToUpdate ]; exists && labelValue == "true" {
211
215
// nothing to do, the label already exists.
216
+ log .WithField ("node" , node .Name ).WithField ("label" , labelToUpdate ).Info ("label already exists" )
212
217
return reconcile.Result {}, nil
213
218
}
214
219
You can’t perform that action at this time.
0 commit comments