konveyor / konveyor/agentic-controller

Per-condition TTL pruning for completed runs

Open
#66 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
2
Forks
12
Avg merge
2d 5h
Merged PRs (30d)
41

Description

Add TTL-based pruning for completed AgentRuns and AgentWorkflowRuns, with separate TTLs per terminal condition.

## Design (per ADR 0006)

Add configurable TTLs:
- `ttlSecondsAfterSucceeded` — TTL for runs that succeeded
- `ttlSecondsAfterFailed` — TTL for runs that failed
- `ttlSecondsAfterCancelled` — TTL for runs that were cancelled

Per-condition TTLs allow different retention policies — e.g., keeping failed runs longer for debugging while aggressively pruning successful runs.

## Controller behavior

- Controller watches for terminal-phase runs and deletes them after the applicable TTL
- Owner references cascade-delete the Sandbox and associated Secrets (ACP key, etc.) automatically
- Follows the same pattern as Kubernetes Jobs (`ttlSecondsAfterFinished`) and Tekton's event-based pruner

## Configuration

TBD whether TTLs are per-CR fields, controller flags, or a ConfigMap. Per-CR fields give the most flexibility; controller flags are simplest to start.

## References

- ADR 0006: Hub addon pattern for agent resources
- Enhancement: [konveyor/enhancements#295](https://github.com/konveyor/enhancements/pull/295) — Run pruning section

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with ADR 0006 and the existing AgentRun and AgentWorkflowRun controller entry points. Trace how terminal phases and owner references are handled, then resolve whether TTLs belong on CRs, flags, or a ConfigMap. Done means each terminal condition uses its configured retention period and deletion cascades to the Sandbox and associated Secrets.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.