k9s icon indicating copy to clipboard operation
k9s copied to clipboard

Manually triggered jobs don't get automatically cleaned up

Open Liroyalima opened this issue 1 year ago • 0 comments




Describe the bug Manually triggered jobs don't get automatically cleaned up, although when triggered trough other tools like Kubectl or OpenLens, they do get automatically cleaned up.

To Reproduce Steps to reproduce the behavior:

  1. Go to the cronjobs screen
  2. Highlight a cronjob and click on t to trigger
  3. Wait for the triggered job's pod to complete its execution
  4. Notice that the job doesn't get cleaned up automatically
  5. Examine the job's definition and see that the OwnerReferences is missing the Controller property (source code, whereas for Kubectl it's defined (source code). Perhaps it's related to the BlockOwnerDeletion property defined in K9s source code that is missing the Kubectl repo, that its intent is to ensure that the deletion of the owner object (cronjob) is blocked until the dependent object (job) is deleted.

Expected behavior The completed job to be automatically cleaned up.

Versions (please complete the following information):

  • OS: macOS Sonoma 14.5 (23F79)
  • K9s: v0.28.2 ⚡️v0.32.5
  • K8s: v1.28.9-eks-036c24b

Additional context Add any other context about the problem here.

Liroyalima avatar Jun 28 '24 15:06 Liroyalima