Currently must-gather jobs/CRs are deleted as soon as it completes (in both cases success or failure). User is not able to get the update about the must-gather operation as status updates on jobs/CRs are lost because of deletion. Make this undeletion behavior flag driven.
Avoid deletion of these CRs.
Explore and decide an appropriate plan for life-time of these jobs/CRs.
Acceptance criteria:
- The undeletion behavior should be flag driven - retainResourcesOnCompletion
- CRs should not get deleted irrespective of the retainResourcesOnCompletion flag value{}
- Must-gather jobs/secrets should not get deleted after the operation completes if the retainResourcesOnCompletion flag is set to true.
- Must-gather jobs/secrets should get deleted after the operation completes if the retainResourcesOnCompletion flag is unset or set to false.
- The pods associated with jobs will get deleted on job success/failure(after retries) irrespective of the retainResourcesOnCompletion flag value as this is being controlled by job controller