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

Cleanup completed gitjobs #2907

Merged
merged 3 commits into from
Sep 30, 2024
Merged

Cleanup completed gitjobs #2907

merged 3 commits into from
Sep 30, 2024

Conversation

manno
Copy link
Member

@manno manno commented Sep 27, 2024

Refers to #2870

This is a workaround until the gitops controller removes jobs as needed in a future release.

Testing

After creating several commits in a git repo, observe there are many completed jobs. One per commit.
Change the new CronJob schedule to minutes: */1 * * * *, observe that all but the latest job are removed for each gitrepo .

@manno manno marked this pull request as ready for review September 27, 2024 12:51
@manno manno requested a review from a team as a code owner September 27, 2024 12:51
Copy link
Contributor

@weyfonk weyfonk left a comment

Choose a reason for hiding this comment

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

This almost LGTM, pending a doubt on client instantiation. Not a functionality nor performance concern.

internal/cmd/cli/cleanup.go Outdated Show resolved Hide resolved
internal/cmd/cli/cleanup.go Outdated Show resolved Hide resolved
internal/cmd/cli/cleanup/cleanup.go Outdated Show resolved Hide resolved
internal/cmd/cli/cleanup/cleanup.go Outdated Show resolved Hide resolved
internal/cmd/cli/cleanup/cleanup.go Show resolved Hide resolved
@manno manno merged commit 2947137 into main Sep 30, 2024
12 checks passed
@manno manno deleted the cleanup-completed-gitjobs branch September 30, 2024 08:27
@0xavi0 0xavi0 mentioned this pull request Oct 2, 2024
3 tasks
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