stakater / Reloader

A Kubernetes controller to watch changes in ConfigMap and Secrets and do rolling upgrades on Pods with their associated Deployment, StatefulSet, DaemonSet and DeploymentConfig – [✩Star] if you're using it!
https://docs.stakater.com/reloader/
Apache License 2.0
7.65k stars 510 forks source link

Reloader support for CronJobs #452

Open ksudarsh00 opened 1 year ago

ksudarsh00 commented 1 year ago

Description: Currently, reloader doesn't support CronJobs, so I have implemented support for Kubernetes CronJobs in the Stakater/Reloader repository and would like to contribute this feature back to the project.

Feature Implementation: I have extended the functionality of Reloader to include support for Kubernetes CronJobs. With this enhancement, Reloader can now detect changes in ConfigMaps/Secrets and perform triggering a Job from an existing CronJob definition.

Steps to Reproduce: To observe the added functionality, you can follow these steps:

Install Reloader in your Kubernetes cluster using the existing installation instructions.

Create a CronJob resource definition and add the annotations to watch for ConfigMaps/secrets.

Apply changes to the ConfigMap/Secrets resource such as modifying the data.

Verify that Reloader detects the changes and triggers a Job from the CronJob.

Code Contribution: I have made the necessary modifications to the Reloader codebase to enable support for Kubernetes CronJobs. The changes include additions to the Reloader's resource detection logic and the implementation of triggering a Job from an existing CronJob.

I have thoroughly tested the feature, which works as expected in my company's pre-production environment.

I would happily contribute the code changes I've made to the Stakater/Reloader repository and collaborate with the maintainers to ensure proper integration.

If you think this feature is lacking and it's in your roadmap. Please let me know how I can proceed with this contribution.

rasheedamir commented 1 year ago

Yes definitely @ksudarsh00! PRs are more than welcome

kaiwalyajoshi commented 1 year ago

Looking forward to this feature as well!

andreyolv commented 1 year ago

Amazing, exactly what I need. Is there any prediction of when they will merge this feature?

RockyMM commented 1 year ago

Feature is available since #486