Cluster component
Stakater Reloader
Restarts services when a ConfigMap or Secret they use changes.
- Memory when idle
- about 20 MiB
- CI measures it once the app is ready and before any traffic. Leave room for more.
- Tested on
- x86 and ARM servers
- Installed by default
- Optional
Introduction
Stakater Reloader restarts a Deployment, StatefulSet or DaemonSet when a ConfigMap or Secret it uses changes. It restarts only workloads that carry the annotation reloader.stakater.com/auto: "true" or reloader.stakater.com/reload, so installing it restarts nothing by itself.
Install it when services should pick up new shared variables or Secrets without a manual restart. It reads every ConfigMap and Secret in the cluster and can patch Deployments, StatefulSets and DaemonSets in every namespace. It leaves Jobs and CronJobs alone.
Use it
In Zeabur OSS, open the service’s Settings → Compute, turn on Restart when its config files or secrets change, then review and apply. Zeabur OSS sets the annotation for you. See Variables.
For a workload outside Zeabur OSS, add the annotation yourself:
kubectl -n <namespace> annotate deployment <name> reloader.stakater.com/auto=true
Remove it
Removing Reloader stops the automatic restarts. The annotations stay on the workloads and do nothing until Reloader is back. After you remove it, restart a service yourself when its ConfigMap or Secret changes. See Remove components.
Troubleshooting
A service still uses the old value
Check that the service has the option on, or that the workload carries the annotation (kubectl -n <namespace> get deployment <name> -o jsonpath='{.metadata.annotations}'). Then check that Reloader runs: kubectl -n reloader get pods, and read its logs with kubectl -n reloader logs deploy/reloader-reloader.
Technical details
This release
- Provides
- config-reload
- Licence
- Apache-2.0
- Homepage
- github.com
- Source file
- components/reloader/component.yaml @ v0.6.3
Tested in CI
CI installs these exact files on a new cluster, waits until they are ready, then records the idle memory.
| Distribution | Platform | Kubernetes | Passed | Idle memory |
|---|---|---|---|---|
| k3s | linux/amd64 | v1.37.2 | 15 MiB | |
| k3s | linux/arm64 | v1.37.2 | 15 MiB | |
| kind | linux/amd64 | v1.37.0 | 10 MiB | |
| kind | linux/arm64 | v1.37.0 | 10 MiB | |
| kubesolo | linux/amd64 | v1.36.6 | 10 MiB | |
| kubesolo | linux/arm64 | v1.36.6 | 10 MiB | |
| rke2 | linux/amd64 | v1.37.2 | 17 MiB | |
| rke2 | linux/arm64 | v1.37.2 | 17 MiB |
Security
ClusterRole: reads, lists and watches every Secret and ConfigMap; reads, updates and patches Deployments, StatefulSets and DaemonSets; creates Events. Role in its namespace: lists, reads, watches, creates and updates every ConfigMap there, not only its own, and on multi-node the leader-election Lease.
What it installs
- reloader 2.2.20