reloader

by joaquinito2051

Helm chartv1.0.2App v0.0.25

Reloader chart that runs on kubernetes

About this chart

RELOADER

A Kubernetes controller to watch changes in ConfigMap and Secrets and then restart pods for Deployment, StatefulSet and DaemonSet

Problem

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

Solution

Reloader can watch changes in ConfigMap and Secret and do rolling upgrades on Pods with their associated Deployments, Deamonsets and Statefulsets.

How to use Reloader

Configmap

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:

Secret

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:

Usage

The following quickstart let's you set up Reloader quickly:

Update the values.yaml and set the following properties

KeyDescriptionExampleDefault Value
watchGloballyOption to watch configmap and secrets in all namespacestruetrue
matchLabelsAdditional match Labels for selector{}{}
deployment.annotationsAnnotations for deployment{}{}
deployment.labelsLabels for deploymentproviderprovider
deployment.image.nameImage name for reloaderstakater/reloaderstakater/reloader
deployment.image.tagImage tag for reloaderv0.0.25v0.0.25
deployment.image.pullPolicyImage pull policy for reloaderIfNotPresentIfNotPresent
deployment.env.openAdditional key value pair as environment variablesSTORAGE: local``
deployment.env.secretAdditional Key value pair as environment variables. It gets the values based on keys from default reloader secret if anyBASIC_AUTH_USER: test``
deployment.env.fieldAdditional environment variables to expose pod information to containers.POD_IP: status.podIP``
rbac.enabledOption to create rbactruetrue
rbac.labelsAdditional labels for rbac{}{}
serviceAccount.createOption to create serviceAccounttruetrue
serviceAccount.nameName of serviceAccountreloaderreloader

Deploying to Kubernetes

You can deploy Reloader by following methods:

Helm Charts

if you have configured helm on your cluster, you can add reloader to helm from public chart repository and deploy it via helm using below mentioned commands


helm repo update

helm install <helm-repo>/reloader

helm install stable/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 <helm-repo>/reloader --set reloader.watchGlobally=false --namespace test

helm install stable/reloader --set reloader.watchGlobally=false --namespace test

Help

Documentation

You can find more documentation here

Have a question?

File a GitHub issue, or send us an email.

Talk to us on Slack

Join and talk to us on Slack for discussing Reloader

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 [email protected]

See our other projects or contact us in case of professional services and queries on [email protected]

Deploy reloader with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has reloader on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartreloader is pinned at v1.0.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply