Question

How to enable TTLAfterFinished in the api server?

I’m trying to auto clean my jobs after finishing and I need to set TTLAfterFinished to true in the api server (documentation).

Since Digital Ocean created the api server on it’s own, I’m not sure how to modify it. How can I do it?

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi,

The master API arguments and settings are managed by DO and can not be changed unfortunately. See our documentation here for the current feature gates enabled: https://www.digitalocean.com/docs/kubernetes/resources/managed/#managed-elements-of-the-master-nodes

We are always open to customer feedback on master and kubelet settings.

There are other ways that you can achieve this sort of behavior without modifying the master API. If your jobs are created via Kubernetes CronJobs you can set history limits to only keep a certain amount of successful or failed jobs: https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/#jobs-history-limits

Regards,

John Kwiatkoski Senior Developer Support Engineer