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

clean up all resources for job when job is suspended #16

Open
wants to merge 1 commit into
base: v1.0-aliyun-branch
Choose a base branch
from

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