stakater/Reloader ? reverse-engineered prompt

Reverse engineered prompt

Build me a Kubernetes controller called Reloader that watches ConfigMaps and Secrets and automatically rolls out the apps that depend on them when they change.

I want it to work in a cluster and handle common workload types like Deployments, StatefulSets, DaemonSets, and DeploymentConfigs. If a workload is annotated to auto reload, it should detect changes to the referenced config or secret and trigger a safe restart so the app picks up the new values without me doing anything manually.

Please make the setup easy to use with simple annotations on the workload, and support both automatic watching and targeting specific named ConfigMaps or Secrets. It should be reliable, production ready, and have clear logs so I can tell what got reloaded and why.

If you need to, look up the current Kubernetes docs online for the best API usage and rollout behavior.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab