Skip to content
New issue

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

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

Already on GitHub? # to your account

[v0.10] Changes job handling in gitops controller #2932

Merged

Conversation

0xavi0
Copy link
Contributor

@0xavi0 0xavi0 commented Oct 7, 2024

Changes the job handling so jobs are deleted after they succeed. Jobs are created when they are needed, this avoids having always a minimum of 1 job per gitrepo resource.

It also deletes the Owns(job) statement from the reconciler setup as we're already setting the controller reference when creating the job and the Owns statement makes extra reconciler calls that are not needed.

Backport of: #2903
Refers to #2931

* Changes job handling in gitopts controller

Changes the job handling so jobs are deleted after they succeed.
Jobs are created when they are needed, this avoids having always a minimum of 1 job per
`gitrepo` resource.

It also deletes the Owns(job) statement from the reconciler setup as we're already setting
the controller reference when creating the job and the Owns statement makes extra reconciler
calls that are not needed.

---------

Signed-off-by: Xavi Garcia <xavi.garcia@suse.com>
@0xavi0 0xavi0 added this to the v2.9.3 milestone Oct 7, 2024
@0xavi0 0xavi0 self-assigned this Oct 7, 2024
@0xavi0 0xavi0 changed the title 0.10 2931 clean successful jobs [v0.10] Changes job handling in gitops controller Oct 7, 2024
Signed-off-by: Xavi Garcia <xavi.garcia@suse.com>
@0xavi0 0xavi0 force-pushed the 0.10-2931-clean-successful-jobs branch from 76f8a22 to 8a96966 Compare October 7, 2024 10:15
@0xavi0 0xavi0 marked this pull request as ready for review October 7, 2024 10:37
@0xavi0 0xavi0 requested a review from a team as a code owner October 7, 2024 10:37
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants