client icon indicating copy to clipboard operation
client copied to clipboard

extend batch.v1.CronJob with generateJob function

Open thomashorrobin opened this issue 2 years ago • 1 comments

There is a need to be able to trigger Cronjobs outside of the normal cron. This PR adds that functionality as an extension to batch.v1.CronJob

thomashorrobin avatar Jul 14 '22 14:07 thomashorrobin

@thomashorrobin nice idea. However, maybe it is better suited as an extension to SwiftkubeModel? I'll take a look and report back here 😉

iabudiab avatar Aug 30 '22 19:08 iabudiab

Cool, okay I'll move it to there. I initially wanted to have it set up like that but I was unsure how the modelgen project worked in relation to SwiftkubeModel, so I was unsure how to fit it in with that workflow. I also couldn't get the modelgen project to work, I received this error: image Regards, I will put it in an extension folder in SwiftkubeModel, add some tests, and submit a PR. Obviously feel free to move it around if you need 👍

thomashorrobin avatar Nov 27 '22 08:11 thomashorrobin

@thomashorrobin Nice, thx!

About modelgen: you have to specify the directory, where the templates reside, e.g.

swiftkube-modelgen --api-version v1.23.11 --templates templates/model --output <path for generated model>

iabudiab avatar Nov 29 '22 00:11 iabudiab