-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Automatic pruning of old TaskRuns / PipelineRuns #2856
Comments
One option is to use a CronJob to clean up old resources. We have some work in flight to implement that as part of our own plumbing: tektoncd/plumbing#442 and some more conversation around this feature idea in the experimental repo: tektoncd/experimental#479 |
Thanks for pointing out those - glad to see we're not the only ones! 😄 And like you said, we are using a CronJob running our script right now to do our own clean up, but seems like a nice feature to have out of the box with Tekton. |
Yup, definitely not alone. We've had similar FRs requesting this, so I'm going to close this issue as a duplicate in favor of #1334. Feel free to add additional comments/context to that issue. Thanks! /triage duplicate |
@wlynch: Closing this issue. 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. |
/kind feature |
Expected Behavior
The tekton-pipelines-controller should automatically prune TaskRuns / PipelineRuns past a given age. This age is optional and can be configured via a ConfigMap value.
Actual Behavior
TaskRuns and PipelineRuns accumulate over the use of Tekton, even though old resources might no longer be valuable (their logs can't be retrieved past 24 hours if I'm not wrong). It makes little sense to keep them around, and they also cause performance issues in the Dashboard as it tries to load all of them. See the related issue here: tektoncd/dashboard#842
Steps to Reproduce the Problem
Additional Info
Kubernetes version:
Output of
kubectl version
:Tekton Pipeline version:
Output of
tkn version
orkubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'
Even if pagination is implemented in the Dashboard, it might still be a good feature to allow automatic pruning of resources if they serve little purpose.
We currently have our own internal script to automate the pruning of TaskRuns / PipelineRuns older than 3 days, via a cron job. It will be great if we could ditch this hacky solution if this became a feature that we can configure as part of the pipelines controller.
The text was updated successfully, but these errors were encountered: