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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃殌 Feature]: Add chart template for creating CronJob to insert any tasks #2115

Open
VietND96 opened this issue Jan 25, 2024 · 1 comment
Milestone

Comments

@VietND96
Copy link
Member

Feature and motivation

There was a discussion around "programmatic solution for killing orphaned sessions after a test suite runs"
The orphaned session could be understood as

the session gets left over by the test suite where driver.quit(?) is not called. as we're testing the implementation, I believe there are instances where too many sessions get stuck in the queue and not quite enough nodes to handle them...
the queue eventually clears but by the end of a 3 hour test (about 600 cases), i sometimes see one or two running for days"

And there was solution with a script and schedule run in a pipeline, something like

we are still kind of benchmarking, in a lab environment i created a batch script that will curl for the status of all nodes then kill any sessions that have been running for too long (15 mins for now).
it runs in the pipeline and uses azure cli to delete the corresponding pod in kubernetes.. since I am using autoscaling a new pod wil automatically take its place

Instead of the pipeline, in Kubernetes has a component CronJob to schedule a task run itself based on cron we set.
Add to chart template for CronJob, which executes a shell script implemented, then everyone can simplify inserting their custom scripts for different tasks there.

Usage example

https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/

Copy link

This issue is looking for contributors.

Please comment below or reach out to us through our IRC/Slack/Matrix channels if you are interested.

@VietND96 VietND96 added this to the 4.22 milestone May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant