operator icon indicating copy to clipboard operation
operator copied to clipboard

Add support for defining `keep` and `keep-since` simultaneously in pruner configuration

Open avinal opened this issue 1 year ago • 1 comments

Feature request

This feature is already present in Tekton cli, referenced by tektoncd/cli#1471 and implemented by tektoncd/cli#1533. It would be logical to update the operator to support a similar functionality in pruner.

Use case

(excerpt taken from tektoncd/cli#1471)

The pruner is used to automatically claim resources used by pipelinruns and/or taskruns by deleting resources exceeding a particular number or age.

There are two criteria used for deleting the resources.

  • keep - delete resources exceeding this number
  • keep-since - delete resources older than this number in minutes

Let us assume I have 100 pipelines of which 20 are younger than 5 mins and I want to keep a maximum of 10 pipelines.

pruner:
  keep: 10
  keep-since: 5

avinal avatar Aug 10 '22 10:08 avinal

/assign @avinal

pradeepitm12 avatar Aug 29 '22 10:08 pradeepitm12

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale with a justification. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

tekton-robot avatar Nov 27 '22 10:11 tekton-robot

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten with a justification. Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

tekton-robot avatar Dec 27 '22 10:12 tekton-robot

/remove-lifecycle rotten

avinal avatar Dec 27 '22 10:12 avinal