Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(#52): add a TTL period to deployed jobs #97

Conversation

jachinte
Copy link
Contributor

This pull request implements the feature I proposed in #52

I've added some documentation in the advanced topics page.

One caveat of this implementation is that Kubernetes's TTL controller doesn't support custom resources. So, setting the ttlSecondsAfterFinished property will clean up master and worker jobs, but won't delete config maps or load tests. In case someone is looking for removal of load tests, config maps and jobs, TwiN/k8s-ttl-controller could be a good alternative.

Please let me know your thoughts on this PR.

Copy link
Owner

@AbdelrhmanHamouda AbdelrhmanHamouda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the very nice work and contribution. It is duly appreciated.

Regarding the PR, I am good with almost everything. The only thing I see missing would be couple of tests that touch on the validation logic.

  • When ttl is default
  • When ttl is something else

charts/locust-k8s-operator/values.yaml Show resolved Hide resolved
docs/advanced_topics.md Outdated Show resolved Hide resolved
docs/helm_deploy.md Show resolved Hide resolved
@AbdelrhmanHamouda
Copy link
Owner

Hello @jachinte,
I am about to start implementation of a new feature and would like to have your work merged first before I do that.
I understand of course that this is a contribution you provided on your own time but if your time will allow to give this more attention soon, I will wait. Otherwise I will move forward and if needed this PR when the time comes can be reconciled.

@jachinte
Copy link
Contributor Author

Hi @AbdelrhmanHamouda,
Thank you for your judicious and detailed reviews. I will be working on your suggestions and comments on Friday and Saturday. Would that be okay for you? Otherwise, I totally understand, and can update the PRs once you're done.

@jachinte
Copy link
Contributor Author

jachinte commented Apr 3, 2023

Hi @AbdelrhmanHamouda, I've updated this PR according to your suggestions. Tests run successfully locally, however, one of the CI checks is not passing. Could you please take a look at that?

@jachinte jachinte force-pushed the 52-feature-request-add-TTL-period-to-deployed-jobs branch from 68328bf to 7c9043e Compare April 3, 2023 15:26
@AbdelrhmanHamouda
Copy link
Owner

Thank you for your contribution. The failing test is something new and it seems that it is due to some hidden change somewhere in one of GitHub Actions. I will work on this separately.

@AbdelrhmanHamouda AbdelrhmanHamouda merged commit 20d206c into AbdelrhmanHamouda:master Apr 21, 2023
@AbdelrhmanHamouda
Copy link
Owner

resolve #52

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

Successfully merging this pull request may close these issues.

2 participants