mayfly icon indicating copy to clipboard operation
mayfly copied to clipboard

Completions Limit for ScheduledResource

Open dersuercan opened this issue 9 months ago • 1 comments

Hello :wave:

This PR solves the following problem I want to create a resource every X time period but I only want to create Y of them

Also adds COMPLETIONS column to the printerColumns of the ScheduledResource CRD.

Concretely, I've added an optional integer field, completions to the ScheduledResource to limit the number of runs in case it's scheduled as a recurring job/cronjob. Currently it has a small validation that it can't be lower than 1 when it's set.

Example resource definition

image

Example kubectl outputs

image Should be the same right after resource creation


image After it creates a resource completion times, Condition switches to Finished and Next Run is cleared

dersuercan avatar Apr 02 '25 11:04 dersuercan

I will be testing and merging this PR soon, thanks for this feature!

yunussandikci avatar Apr 07 '25 07:04 yunussandikci