We would like to watch if some change happens in ConfigMap
and/or Secret
; then perform a rolling upgrade on relevant Deployment
, Deamonset
and Statefulset
Reloader can watch changes in ConfigMap
and Secret
and do rolling upgrades on Pods with their associated Deployments
, Deamonsets
and Statefulsets
.
For a Deployment
called foo
have a ConfigMap
called foo-configmap
. Then add this annotation to main metadata of your Deployment
kind: Deployment
metadata:
annotations:
configmap.reloader.stakater.com/reload: "foo-configmap"
spec:
template:
metadata:
Use comma separated list to define multiple configmaps.
kind: Deployment
metadata:
annotations:
configmap.reloader.stakater.com/reload: "foo-configmap,bar-configmap,baz-configmap"
spec:
template:
metadata:
For a Deployment
called foo
have a Secret
called foo-secret
. Then add this annotation to main metadata of your Deployment
kind: Deployment
metadata:
annotations:
secret.reloader.stakater.com/reload: "foo-secret"
spec:
template:
metadata:
Use comma separated list to define multiple secrets.
kind: Deployment
metadata:
annotations:
secret.reloader.stakater.com/reload: "foo-secret,bar-secret,baz-secret"
spec:
template:
metadata:
You can deploy Reloader by following methods:
You can apply vanilla manifests by running the following command
kubectl apply -f https://raw.githubusercontent.com/stakater/Reloader/master/deployments/kubernetes/reloader.yaml
By default Reloader gets deployed in default
namespace and watches changes secrets
and configmaps
in all namespaces.
Alternatively if you have configured helm on your cluster, you can add reloader to helm from our public chart repository and deploy it via helm using below mentioned commands
helm repo add stakater https://stakater.github.io/stakater-charts
helm repo update
helm install stakater/reloader
Note: By default reloader watches in all namespaces. To watch in single namespace, please run following command. It will install reloader in test
namespace which will only watch Deployments
, Deamonsets
and Statefulsets
in test
namespace.
helm install stakater/reloader --set reloader.watchGlobally=false --namespace test
You can find more documentation here
File a GitHub issue, or send us an email.
Join and talk to us on Slack for discussing Reloader
Please use the issue tracker to report any bugs or file feature requests.
PRs are welcome. In general, we follow the "fork-and-pull" Git workflow.
- Fork the repo on GitHub
- Clone the project to your own machine
- Commit changes to your own branch
- Push your work back up to your fork
- Submit a Pull request so that we can review your changes
NOTE: Be sure to merge the latest from "upstream" before making a pull request!
View our closed Pull Requests.
Apache2 © Stakater
Reloader
is maintained by Stakater. Like it? Please let us know at [email protected]
See our other projects or contact us in case of professional services and queries on [email protected]
- ConfigmapController; We documented here why we re-created Reloader