Skip to content

feat(k8s): Add function to create job from cronjob#1658

Merged
james00012 merged 1 commit intogruntwork-io:mainfrom
steffsas:feat/cronjob-to-job-support
Feb 4, 2026
Merged

feat(k8s): Add function to create job from cronjob#1658
james00012 merged 1 commit intogruntwork-io:mainfrom
steffsas:feat/cronjob-to-job-support

Conversation

@steffsas
Copy link
Copy Markdown
Contributor

Description

This PR introduces the functionality to create Kubernetes Jobs from an already applied CronJob. This function is similar to the command kubectl create job xyz --from=cronjob/xyz (see https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_job/#synopsis). As the documentation of Kubernetes already implies, this functionality is mainly used for testing CronJobs, so it would perfectly align with terratest's mission.

TODOs

Read the Gruntwork contribution guidelines.

  • Update the docs.
  • Run the relevant tests successfully, including pre-commit checks.
  • Ensure any 3rd party code adheres with our license policy or delete this line if its not applicable.
  • Include release notes. If this PR is backward incompatible, include a migration guide.
  • Make a plan for release of the functionality in this PR. If it delivers value to an end user, you are responsible for ensuring it is released promptly, and correctly. If you are not a maintainer, you are responsible for finding a maintainer to do this for you.

Release Notes (draft)

Added functionality to create Kubernetes Jobs from an existing CronJob.

Migration Guide

There is no migration guide needed.

@steffsas steffsas force-pushed the feat/cronjob-to-job-support branch from 7c5f4dd to 57b58c6 Compare January 29, 2026 12:30
james00012
james00012 previously approved these changes Feb 2, 2026
Copy link
Copy Markdown
Contributor

@james00012 james00012 left a comment

Choose a reason for hiding this comment

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

Overall the change LGTM. You just need to update the branch with the latest changes pushed to the main branch.

@steffsas steffsas force-pushed the feat/cronjob-to-job-support branch from 57b58c6 to b8dc468 Compare February 2, 2026 09:25
@steffsas
Copy link
Copy Markdown
Contributor Author

steffsas commented Feb 2, 2026

Overall the change LGTM. You just need to update the branch with the latest changes pushed to the main branch.

done

Copy link
Copy Markdown
Contributor

@james00012 james00012 left a comment

Choose a reason for hiding this comment

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

LGTM

@james00012 james00012 merged commit 2d31ac0 into gruntwork-io:main Feb 4, 2026
2 checks passed
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