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: override to be able to force cronjob into service pod #349

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

shreddedbacon
Copy link
Member

In some cases, a cronjob that would typically be run as a native kuberentes CronJob type may be better to run within the pod of the service directly. Since the in pod and native kubernetes switch is based on the interval of the cronjob, there is no way to do this without increasing the frequency of the cronjob, or writing a wrapper around the cronjob.

This offers a simple way to tell a cronjob to run in the service pod instead of a kubernetes native CronJob by way of an inPod field.

Set this to true, and the pod will be converted to an in pod cronjob:

- name: my special cronjob
  schedule: "45 * * * *"
  command: example cronjob command
  service: cli
  inPod: true

@shreddedbacon shreddedbacon added this to the 2.21.0 milestone Aug 9, 2024
@shreddedbacon shreddedbacon force-pushed the native-cronjob-disable branch 3 times, most recently from 35ac8c1 to 921be54 Compare August 18, 2024 21:59
@shreddedbacon shreddedbacon marked this pull request as ready for review August 19, 2024 00:18
@shreddedbacon shreddedbacon force-pushed the native-cronjob-disable branch from 921be54 to 2c3ba9f Compare August 20, 2024 06:09
@shreddedbacon shreddedbacon force-pushed the native-cronjob-disable branch from 2c3ba9f to 080b5bc Compare August 20, 2024 23:52
Copy link
Member

@tobybellwood tobybellwood left a comment

Choose a reason for hiding this comment

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

THis makes sense to me!

@shreddedbacon shreddedbacon force-pushed the native-cronjob-disable branch from 080b5bc to 2d57050 Compare August 23, 2024 02:25
@shreddedbacon shreddedbacon merged commit 0401a0a into main Aug 23, 2024
2 checks passed
@shreddedbacon shreddedbacon deleted the native-cronjob-disable branch August 23, 2024 03:57
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