-
Notifications
You must be signed in to change notification settings - Fork 38
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
[WIP] feat(pattern): add job harvester pattern #68
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Pull Request Test Coverage Report for Build 1083336552
💛 - Coveralls |
@tlwu2013 @jmccormick2001 whipped up this super simple (functionality-wise) POC after our discussion yesterday. All this does is write a Job's Pod logs streams to some writer, then delete the Job. I'd like to try out some ideas for log writer interfaces as the current |
There is an alternative to this implementation, which does not involve adding a new controller/helper for cleaning up jobs, that imo is a more desirable approach but involves more input from library users:
Implementing (1) is the difficult bit, since a custom log-forwarding image is required (for production). This setup is also very log-architecture dependent. |
Signed-off-by: Eric Stroczynski <ericstroczynski@gmail.com>
After some thought, it seems the controller + finalizer approach is the right way to go for a general solution that enforces lossless log collection. The TTL controller approach works great if you have logging infrastructure that you can drop into a pod spec, which many operators do; the logging implementation is difficult to create a pattern around since usage varies widely depending on what log aggregation system is used. |
Signed-off-by: Eric Stroczynski <ericstroczynski@gmail.com>
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
@openshift-bot: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Description of the change: added the
pattern/jobharvester
package with Job log forwarding and garbage collection functionality.Motivation for the change: lots of operators spawn jobs for various tasks. This simple controller exposes both the primitive
Harvester
type to get a Job's Pod logs then delete the Pod, or a higher level controller implementation for low-LOC, background Job harvesting./kind feature
Signed-off-by: Eric Stroczynski ericstroczynski@gmail.com