f5devcentral / volt-demo-app

The Unlicense
6 stars 6 forks source link

Clean `failed` pods #25

Closed kreynoldsf5 closed 3 years ago

kreynoldsf5 commented 3 years ago

For one reason or another, pods will fail (and the scheduler will recreate these). They are not being cleaned up and this is counting against storage quotas.

Fix this.

kreynoldsf5 commented 3 years ago

We can't call the local kube-api from a pod with a serviceAccount. This makes sense -- the api endpoint we need to hit is really the vk8s endpoint.

We'll need to use a kubeconfig passed into a job pod.

kreynoldsf5 commented 3 years ago

Let's do this from the spec itself.

For Jobs we can use ttlSecondsAfterFinished. We'll need to determine the correct way to handle for deployments.

kreynoldsf5 commented 3 years ago

Using the following in the CronJon instead:

failedJobsHistoryLimit successfulJobsHistoryLimit