apiVersion: kyverno.io/v2beta1 kind: ClusterCleanupPolicy metadata: name: cleanup-terminal-pods spec: match: any: - resources: kinds: - Pod conditions: all: - key: "{{ target.status.phase }}" operator: AnyIn value: - Succeeded - Failed - key: "{{ time_diff('{{ target.metadata.creationTimestamp }}','{{ time_now_utc() }}') }}" operator: GreaterThan value: 30m schedule: "*/15 * * * *"