Skip to content

Conversation

KunWuLuan
Copy link

Controller will clean up all resources for job when job is suspended

return true
}
}
// if tfJob.Annotations != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not using isSuspend to avoid creating resources like pod? If it's for ECI scenario, will it create pod and delete it after a while?

@KunWuLuan
Copy link
Author

Thanks for your time and assistance. @cheyang

We will check the job status here:

if isSucceeded(tfjob.Status) || isFailed(tfjob.Status) || tfJobExceedsLimit {

and we will start to reconcile pods only when the checking failed:

err = tc.reconcilePods(tfjob, pods, rtype, spec, replicasStatus)

So we don't need another pre checking out of reconcileTFJobs.

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

Successfully merging this pull request may close these issues.

2 participants