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

Allow using PipelineRun delete arguments "keep" and "keepSince" together #2206

Open
wilstdu opened this issue Jan 3, 2024 · 1 comment
Open
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@wilstdu
Copy link

wilstdu commented Jan 3, 2024

Feature request

We're using Tekton Operator Pruner to delete old PipelineRuns from the cluster. Tekton Operator Pruner uses Tekton CLI to delete PipelineRuns. However, it's impossible to delete PipelineRuns both by their age and count in the namespace.

Allow using PipelineRun delete arguments "keep" and "keepSince" together.

Use case

Tekton runs PipelineRuns in multiple, dynamically created namespaces, some namespaces get more traffic, others - less (for understanding: production and development branch namespace).

  • Setting only keep-since argument is not an option because more active namespaces will hold too many irrelevant (old) PipelineRuns, this is a problem because having too many PipelineRuns in the cluster is in general bad - it affects Tekton performance - high CPU usage for controller, slow WEB UI, from our observations - the acceptable amount of total PipelineRuns in the cluster is around 2k.
  • Setting only keep argument is not an option, because some less often-used namespaces will keep irrelevant (old) PipelineRuns until the threshold is reached and again the problem here is that old PipelineRuns from multiple namespaces with less traffic stack up and the total number of PipelineRuns is too high in the Cluster.

Setting any of these settings to a low value is not an option, because then still relevant information may be deleted.
Having the ability to set both of these at the same time would help for the mentioned problems: it would be possible to set "keep" to like 500 PipelineRuns (this solves the problem of high-traffic namespaces) and "keep-since" with age of like 14 days to remove irrelevant (old) PipelineRuns (that would be beneficial for namespaces with not so much activity).

@austin0
Copy link

austin0 commented Jan 30, 2024

Looks like #1990 covers this? Definitely something that would be nice to have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants