hooks: add support for job and cronjobs#2439
Merged
raghavendra-talur merged 1 commit intoRamenDR:mainfrom Apr 8, 2026
Merged
Conversation
29529e8 to
8724c7a
Compare
48e47fa to
882f9a5
Compare
raghavendra-talur
requested changes
Apr 2, 2026
Member
raghavendra-talur
left a comment
There was a problem hiding this comment.
I have one comment in exec_hook.go, other than that the rest of the code looks good to me.
| // If no pods are found and SkipHookIfNotPresent is false, return an error | ||
| // This will cause the controller to retry when pods become available | ||
| if len(execPods) == 0 { | ||
| if e.Hook.SkipHookIfNotPresent { |
Member
There was a problem hiding this comment.
I don't think SkipHookIfNotPresent applies for exec hooks. It was only meant for check hooks. In this case, if no pods are found, then we should treat it as an error. It is a user mistake if they specify exec hook for a job/cronjob which runs for a short interval.
882f9a5 to
0971db4
Compare
As of now, for exec hooks, deployments, daemonsets, statefulsets and pods are supported. Job and CronJob support is being added through this PR. Assisted by Bob Signed-off-by: Annaraya Narasagond <annarayanarasagond@gmail.com>
0971db4 to
9431aeb
Compare
raghavendra-talur
approved these changes
Apr 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As of now, for exec hooks, deployments, daemonsets, statefulsets and pods are supported. Job and CronJob support is being added through this PR.
Assisted by AI