-
Notifications
You must be signed in to change notification settings - Fork 420
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
House keeper for Pipeline related stuff #64
Comments
I agree that resource build up could/would become cumbersome since we are generating resources based on events. Triggers is enabling users to create these resources simply, which only exacerbates this Tekton issue. Maybe an option could be added to the PipelineRuns/TaskRuns, where |
Could we add So the problem is when to delete the
|
|
This has also been discussed here: tektoncd/pipeline#544 |
Proposal:
When creation, all resources in
In controller of
|
I believe the next step being taken to address the resource proliferation is to embed |
Yes, but beside the embed case, This is a very draft solution, but I think we need consider the issue now, always welcome suggestion. |
For generic garbage collection, the Kubernetes documentation only seems to mention owner references and cron job based deletion. |
Yes, the upper proposal is based on the owner references. |
I agree that we don't want to use the EventListener as the OwnerReference, because the EventListener is supposed to persist through multiple triggerings of resource creation. So, I think that one cleanup mechanism could be to give every triggered resource a label using the Another weirder option which might be a little heavy would be to create a new Event CustomResource. This Event resource would be created with all of the triggered resources, and would be the owner of all the triggered resources. So, if a user wanted to clean up all of the resources, they could delete the Event resource. @vincent-pli do you think either of these cleanup options are adequate? |
@ncskier Thanks for your comments. Please take a look at my previous comments: #64 (comment)
I think the three options are not conflict, actually I think we can implement option 1 and 2 then document it. |
@vincent-pli Good point. One thing that may help however is that all labels cascade from the |
Good point @vtereso, you could just use the label |
I think we want to consider some solution that persists the state/history of runs off-cluster, at which point it's safe to delete it from the cluster (or mark it for eventual later deletion). The system for persistent off-cluster storage/indexing isn't designed yet (tektoncd/pipeline#453), but I believe it would solve this and many other problems in a CI/CD system, like tracking the success of a continuous build over time, searching for provenance of an image or deployment, etc. This doesn't seem like a triggering-specific problem; PipelineRuns shouldn't be able to continuously accrete on a cluster indefinitely, regardless of whether they were triggered or manually run. I'd like to move this to the Pipelines repo since this is an issue with PipelineRuns/TaskRuns. (However, that being said, if triggers are going to be capable of creating arbitrary K8s resources on-demand -- e.g., Jobs, ConfigMaps -- then triggering will have come up with some way of reaping those when it can determine they're unneeded. I don't think we can solve that the same way we can for PipelineRuns, since we know a lot more about the semantics of PipelineRuns.) |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
Expected Behavior
When
event
received, deployment ofEventListener
will create at least onePipelineResource
and onePipelinerun
, then those stuff will get out of hand ofTrigger
.That’s caused a problem, after period, there will be tens of hundreds
pipeline
related stuff leaved.So I think we need setup garbage disposal/house keeper mechanism for the situation.
I saw #48 , but it need delete
EventListener
to clean all stuff. I thinkEventListener
is design for long term running.Actual Behavior
Currently, nothing for this
The text was updated successfully, but these errors were encountered: