Introduction

Tekton Pruner manages the lifecycle of Tekton resources by automatically cleaning up completed PipelineRuns and TaskRuns based on configurable time-based (TTL) and history-based policies.

TOC

Overview

Tekton Pruner provides event-driven and configuration-based cleanup through four controllers:

  • Main Pruner Controller: Processes cleanup based on ConfigMap settings
  • Namespace Pruner Config Controller: Watches namespace-level ConfigMaps
  • PipelineRun Controller: Handles PipelineRun events
  • TaskRun Controller: Handles standalone TaskRun events

Tekton Pruner overview

Key Features

  • Time-based Pruning (TTL): Delete resources after specified duration (in seconds) using ttlSecondsAfterFinished
  • History-based Pruning: Retain fixed number of runs using successfulHistoryLimit, failedHistoryLimit, or historyLimit
  • Hierarchical Configuration: Allows users to specify cluster-wide or per Namespace or per group of resources within a Namespace
  • Flexible Selectors: Group resources by labels, annotations, or names (name refers to the pipeline name) for fine-grained control