Faizan Ahmad 569c0469fe [STK-322] Add Reloader vs ConfigmapController doc (#11)
* Add Reloader vs ConfigmapController doc

* Rename doc to docs

* Rename Reloader vs ConfigmapController to Reloader-vs-ConfigmapController

* Fix Reloader-vs-ConfigmapController heading
2018-07-29 11:13:32 +02:00
2018-07-17 09:15:03 +00:00
2018-07-13 16:46:35 +05:00
2018-07-27 10:48:26 +00:00
2018-07-24 21:17:56 +05:00
2018-07-17 12:55:56 +05:00
2018-07-26 18:21:43 +05:00
2018-07-13 14:55:02 +05:00
2018-07-26 20:23:20 +05:00
2018-07-26 20:23:20 +05:00

RELOADER

Problem

We would like to watch if some change happens in ConfigMap and Secret objects and then perform certain upgrade on relevant Deployment, Deamonset and Statefulset

Solution

Reloader can watch any changes in ConfigMap and Secret objects and update or recreate Pods for their associated Deployments, Deamonsets and Statefulsets. In this way Pods can get the latest changes in ConfigMap or Secret objects.

NOTE: This controller has been inspired from configmapController

How to use Reloader

For a Deployment called foo have a ConfigMap called foo. Then add this annotation to your Deployment

metadata:
  annotations:
    configmap.reloader.stakater.com/reload: "foo"

OR

For a Deployment called foo have a Secret called foo. Then add this annotation to your Deployment

metadata:
  annotations:
    secret.reloader.stakater.com/reload: "foo"

Then, providing Reloader is running, whenever you edit the ConfigMap or Secret called foo the Reloader will update the Deployment by adding the environment variable:

STAKATER_FOO_REVISION=${reloaderRevision}

This then triggers a rolling upgrade of your deployment's pods to use the new configuration.

Same procedure can be followed to perform rolling upgrade on Deamonsets and Statefulsets as well.

Deploying to Kubernetes

You can deploy Reloader by running the following kubectl commands:

kubectl apply -f rbac.yaml -n <namespace>
kubectl apply -f deployment.yaml -n <namespace>

Vanilla Manifests

You can apply vanilla manifests by running the following command

kubecl apply -f https://raw.githubusercontent.com/stakater/Reloader/master/deployments/kubernetes/reloader.yaml

Helm Charts

Or alternatively if you configured helm on your cluster, you can deploy Reloader via helm chart located under deployments/kubernetes/chart/reloader folder.

Monitor All namespaces

You can monitor all namespaces in cluster by setting the watchGlobally flag to true in manifest file.

Help

Got a question? File a GitHub issue, or send us an email.

Talk to us on Slack

Join and talk to us on the #tools-imc channel for discussing Reloader

Join Slack Chat

Contributing

Bug Reports & Feature Requests

Please use the issue tracker to report any bugs or file feature requests.

Developing

PRs are welcome. In general, we follow the "fork-and-pull" Git workflow.

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. 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!

Changelog

View our closed Pull Requests.

License

Apache2 © Stakater

About

Reloader is maintained by Stakater. Like it? Please let us know at hello@stakater.com

See our other projects or contact us in case of professional services and queries on hello@stakater.com

Description
A Kubernetes controller to watch changes in ConfigMap and Secrets and do rolling upgrades on Pods with their associated Deployment, StatefulSet, DaemonSet and DeploymentConfig – [✩Star] if you're using it!
Readme Apache-2.0 30 MiB
Languages
Go 98.5%
Makefile 0.9%
Smarty 0.4%
Dockerfile 0.2%