karmada icon indicating copy to clipboard operation
karmada copied to clipboard

graceful eviction tasks in resource binding never cleaned

Open tedli opened this issue 1 year ago • 8 comments

What happened:

the gracefulEvictionTasks field in spec of resource binding, grows, never cleaned.

What you expected to happen:

if the task already finished, task should removed from gracefulEvictionTasks

How to reproduce it (as minimally and precisely as possible):

patch gracefulEvictionTasks add item to trigger eviction, ensure the task finished, check the graceful eviction tasks field, the task still remain.

Anything else we need to know?:

it may because of line 73, the Patch acts a merge behaviour, which won't remove tasks not kept :

https://github.com/karmada-io/karmada/blob/b01cf50caee8c895c808c2ba7d7dbb75eff2a5b8/pkg/controllers/gracefuleviction/rb_graceful_eviction_controller.go#L64-L76

Environment:

  • Karmada version:
  • kubectl-karmada or karmadactl version (the result of kubectl-karmada version or karmadactl version):
  • Others:

tedli avatar Jul 03 '23 08:07 tedli