pulumi / pulumi-kubernetes-operator

A Kubernetes Operator that automates the deployment of Pulumi Stacks
Apache License 2.0
225 stars 54 forks source link

Garbage collection for Update objects #733

Open EronWright opened 1 week ago

EronWright commented 1 week ago

Update objects accumulate indefinitely in the system, and the operator should cleanup the old completed updates, e.g. after a week or so.

Should the Update controller handle the cleanup uniformly? Or should the Stack controller handle the cleanup for the updates that it owns? I would lean towards the former, by introducing a Update.spec.ttlSecondsAfterFinished field that the Stack controller may set and is implemented by the Update controller.

See https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/

cleverguy25 commented 1 week ago

Added to epic https://github.com/pulumi/pulumi-kubernetes-operator/issues/586