How to delete Kubernetes drone build jobs after completion?

or after X minutes? Is there any way to do it or is this considered a bad practice?

Drone will do this automatically, but it needs your cluster to support the TTLAfterFinished feature. That one is only available since Kubernetes 1.12, so most likely you just need to upgrade your cluster in order for this to work.

(Confirmed to work for me on GKE, with version 1.12.5.)


Very cool answer @raucao I didn’t know this. We used to clean up.

1 Like