Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jobs and Cronjobs lifecycle should be controlled by snoopy-operator #45

Open
3 tasks
acmenezes opened this issue Feb 15, 2022 · 3 comments
Open
3 tasks
Labels
enhancement New feature or request

Comments

@acmenezes
Copy link
Collaborator

acmenezes commented Feb 15, 2022

Currently the jobs are owned by snoopyJob CR and if a completed job is deleted by hand the controller restarts it. We need a solution to control the whole lifecycle of jobs avoiding those restarts and doing the proper cleanup.

  • One way to accomplish this is by using the status field to register all the Jobs and CronJobs that were completed.
  • With that the controller should always verify if the Job is registered in the status field as completed before initializing it.
  • Add a finalizer to the snoopyJob CR to make sure this routine is checked if the CR is deleted and also if someone tries to delete those Jobs by hand.
@tokalevasant
Copy link

tokalevasant commented Feb 21, 2022

Hi Alex,
I would like to take this but would like to discuss exact requirements/process. Let's discuss this in our next meeting.

@acmenezes
Copy link
Collaborator Author

Sure @tokalevasant ! We can discuss in our meeting.

@acmenezes
Copy link
Collaborator Author

As per our triage meeting we agreed that a finalizer would the best way to accomplish this.
The finalizer would be used by the reconciler for:

  • check the job status
  • if job completed it would delete the finalizer
  • update the CR status field with job completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants