0

I've installed Tekton Operator and Tekton Config as described here:

https://tekton.dev/docs/operator/tektonconfig/

In the tektonconfig, it has a block like this:

    pruner:
      resources:
      - taskrun
      - pipelinerun
      keep: 3
      schedule: "* * * * *"

However, this will result in it keeping only 3 copies of taskruns AND pipelineruns. A single pipeline may have a dozen tasks in it. As soon as you delete the taskruns from the pipelinerun, you can no longer see the logs for that pipelinerun so it's useless.

I don't see a way to have pipelineruns use different pruning methods compared to taskruns. This makes it almost pointless to enable this feature. Is anyone aware of a better way to prune pipeline and task runs in tekton?

Thanks!

Update: turns out I can just exclude the taskrun line from my resources and it will automatically prune the taskruns when the pipelineruns are pruned so it's a non issue.

Gary Turner
  • 189
  • 9
  • Tekton built-in pruning mechanism is indeed useless, Yet pruning older objects is eventually recommended: with lots of pipelineruns/taskruns that keep accumulating: etcd grows, and tekton controller tends to behave poorly under such circumstances. The way I do it is with a CronJob, looking at metadata.creationTimestamp. Dropping everything after N days. Then: you can ensure some kind of consistency between pipelineruns/tasks/pods logs. – SYN Apr 16 '23 at 10:10

0 Answers0