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: 🎸 support CronJobs #16

Merged
merged 6 commits into from
Jul 6, 2023

Conversation

oeduardoal
Copy link
Contributor

@oeduardoal oeduardoal commented Feb 2, 2023

Solve: #15

This PR allows k8s-digester to work with CronJob in Kubernetes

CleanShot 2023-02-02 at 15 38 57@2x

@google-cla
Copy link

google-cla bot commented Feb 2, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@halvards
Copy link
Member

halvards commented Feb 3, 2023

Thanks for the contribution @oeduardoal, this looks great!

You'll need to sign the CLA before I can merge.

@oeduardoal
Copy link
Contributor Author

Thanks for the contribution @oeduardoal, this looks great!

You'll need to sign the CLA before I can merge.

Thank you @halvards! I just needed to fix the code to pass on tests.

@halvards
Copy link
Member

Thanks @oeduardoal! Could you please add a unit test for CronJob resources to resolve_test.go?

You can see how to programmatically create K8s resources in resolve_stub_test.go. It already has code for Pod and Deployment resources.

@breunigs
Copy link

breunigs commented Feb 16, 2023

I believe this PR also needs to add code to pick up .spec.jobTemplate.spec.template.spec.imagePullSecrets (and …serviceAccountName?) in createK8schain.

@oeduardoal
Copy link
Contributor Author

@halvards tests added!!

@halvards
Copy link
Member

Thanks for adding the tests @oeduardoal!

@breunigs is right though, this change also needs to handle registry authentication by picking up imagePullSecrets and serviceAccountName from the jobTemplate spec in https://github.com/google/k8s-digester/blob/main/pkg/keychain/keychain.go#L70

@jcortejoso
Copy link

@oeduardoal Thanks for the PR. We are facing this limitation and we'd like to know if there is any update to add this feature.

Thanks again!

Copy link
Member

@halvards halvards left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for your contribution - and your patience!

@halvards halvards merged commit 81fb95e into google:main Jul 6, 2023
2 checks passed
@oeduardoal oeduardoal deleted the feat/support-cronjobs branch July 26, 2023 04:13
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.

4 participants