Open Source
All templates and components

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

Tested in CI

CI installs these exact files on a new cluster, waits until they are ready, then records the idle memory.

DistributionPlatformKubernetesPassedIdle memory
k3slinux/amd64v1.37.215 MiB
k3slinux/arm64v1.37.215 MiB
kindlinux/amd64v1.37.010 MiB
kindlinux/arm64v1.37.010 MiB
kubesololinux/amd64v1.36.610 MiB
kubesololinux/arm64v1.36.610 MiB
rke2linux/amd64v1.37.217 MiB
rke2linux/arm64v1.37.217 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