@@ -233,22 +233,25 @@ func (ec *Controller) enqueuePod(logger klog.Logger, obj interface{}, deleted bo
233
233
logger .V (6 ).Info ("pod with resource claims changed" , "pod" , klog .KObj (pod ), "deleted" , deleted )
234
234
235
235
// Release reservations of a deleted or completed pod?
236
- if needsClaims , reason := podNeedsClaims (pod , deleted ); ! needsClaims {
236
+ needsClaims , reason := podNeedsClaims (pod , deleted )
237
+ if needsClaims {
238
+ logger .V (6 ).Info ("Not touching claims" , "pod" , klog .KObj (pod ), "reason" , reason )
239
+ } else {
237
240
for _ , podClaim := range pod .Spec .ResourceClaims {
238
241
claimName , _ , err := resourceclaim .Name (pod , & podClaim )
239
242
switch {
240
243
case err != nil :
241
244
// Either the claim was not created (nothing to do here) or
242
245
// the API changed. The later will also get reported elsewhere,
243
246
// so here it's just a debug message.
244
- logger .V (6 ).Info ("Nothing to do for claim during pod change" , "err" , err , "reason" , reason )
247
+ logger .V (6 ).Info ("Nothing to do for claim during pod change" , "pod" , klog . KObj ( pod ), "podClaim" , podClaim . Name , " err" , err , "reason" , reason )
245
248
case claimName != nil :
246
249
key := claimKeyPrefix + pod .Namespace + "/" + * claimName
247
- logger .V (6 ).Info ("Process claim" , "pod" , klog .KObj (pod ), "key" , key , "reason" , reason )
250
+ logger .V (6 ).Info ("Process claim" , "pod" , klog .KObj (pod ), "claim" , klog . KRef ( pod . Namespace , * claimName ), " key" , key , "reason" , reason )
248
251
ec .queue .Add (key )
249
252
default :
250
253
// Nothing to do, claim wasn't generated.
251
- logger .V (6 ).Info ("Nothing to do for skipped claim during pod change" , "reason" , reason )
254
+ logger .V (6 ).Info ("Nothing to do for skipped claim during pod change" , "pod" , klog . KObj ( pod ), "podClaim" , podClaim . Name , " reason" , reason )
252
255
}
253
256
}
254
257
}
@@ -382,7 +385,7 @@ func (ec *Controller) enqueueResourceClaim(logger klog.Logger, obj interface{},
382
385
return
383
386
}
384
387
if len (objs ) == 0 {
385
- logger .V (6 ).Info ("claim got deleted while not needed by any pod, nothing to do " , "claim" , klog .KObj (claim ))
388
+ logger .V (6 ).Info ("unrelated to any known pod " , "claim" , klog .KObj (claim ))
386
389
return
387
390
}
388
391
for _ , obj := range objs {
0 commit comments