Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Implement default values for job history limits #39

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hikhvar
Copy link

@hikhvar hikhvar commented Nov 13, 2020

According to the documentation of both the cronjob and tzcronjob the defaults for the job limits are either 1 for failed jobs and 3 for successful jobs. Currently tzCronjobber ignores those defaults completely.

@obitech
Copy link

obitech commented Nov 23, 2020

@hiddeco any opinions on this PR? This could really help us since there are a lot of completed jobs in our clusters. It would make it much easier to adjust this on the controller-side, other than edit each TZCronJob.

@hiddeco
Copy link
Owner

hiddeco commented Dec 2, 2020

👋, sorry it took me so long to get to this.

This is indeed a mistake from my side, and thanks for noticing this and creating a (working) patch. The more idiomatic way of doing this, and also how this is done in the Kubernetes cronjob controller, is by defining default values in the v1alpha1 API package.

This approach has my preference as it does not create "buried" default values in the orchestrating controller code.

@hikhvar
Copy link
Author

hikhvar commented Mar 12, 2021

Hey sorry for the long delay, was also busy and forgot this PR. I tried the defaulters from the upstream controller in #41. However in my test setup, this does not work. I'm not that familiar with the kubernetes API machinery. Can you maybe give me a hint what I did wrong?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants