Skip to content

Using Stakater Reloader to Trigger Reloads When Dependencies Change#

Stakater's Reloader watches for changes in ConfigMaps and Secrets and reloads the appropriate resources.

Usage#

Reloader is very simple to use, requiring only the use of appropriate annotations.

Auto#

The simplest way to use Reloader is to add the reloader.stakater.com/auto: "true" annotation to a DeploymentConfig, Deployment, Daemonset, Statefulset, or Rollout. This will cause reload for all Configmaps or Secrets refereced.

kind: Deployment
metadata:
  annotations:
    reloader.stakater.com/auto: "true"

These can be typed if you would like more specificity. secret.reloader.stakater.com/auto secret.reloader.stakater.com/auto

Another way to engage the reloader is to use the search function.

By including annotationreloader.stakater.com/search: "true" in the object to be reloaded, you can then include reloader.stakater.com/match: "true" in the secret or configmap. The auto behavior overwrites this.

 kind: Deployment
 metadata:
   annotations:
     reloader.stakater.com/search: "true"
kind: ConfigMap
metadata:
   annotations:
     reloader.stakater.com/match: "true"

Reloading on Specific ConfigMaps and Secrets#

It is possible to specify a specific resource to restart for using the following annoations, specifying the resource names, comma separated.

configmap.reloader.stakater.com/reload configmap.reloader.stakater.com/reload

kind: Deployment
metadata:
  annotations:
    secret.reloader.stakater.com/reload: "foo-secret,bar-secret,baz-secret"

Further Reading#

You can find more information and other instructions on the Reloader's GitHub repo. More advanced usage docs can be found on the Stakater Reloader website.