You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/How-it-works.md
+8-8
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
-
# How does Reloader work?
1
+
# How Does Reloader Work?
2
2
3
3
Reloader watches for `ConfigMap` and `Secret` and detects if there are changes in data of these objects. After change detection Reloader performs rolling upgrade on relevant Pods via associated `Deployment`, `Daemonset` and `Statefulset`.
4
4
5
-
## How change detection works
5
+
## How Change Detection Works
6
6
7
7
Reloader watches changes in `configmaps` and `secrets` data. As soon as it detects a change in these. It forwards these objects to an update handler which decides if and how to perform the rolling upgrade.
8
8
9
-
## Requirements for rolling upgrade
9
+
## Requirements for Rolling Upgrade
10
10
11
11
To perform rolling upgrade a `deployment`, `daemonset` or `statefulset` must have
12
12
@@ -37,21 +37,21 @@ metadata:
37
37
38
38
Above mentioned annotation are also work for `Daemonsets` `Statefulsets` and `Rollouts`
39
39
40
-
## How Rolling upgrade works?
40
+
## How Does Rolling Upgrade Work?
41
41
42
42
When Reloader detects changes in configmap. It gets two objects of configmap. First object is an old configmap object which has a state before the latest change. Second object is new configmap object which contains latest changes. Reloader compares both objects and see whether any change in data occurred or not. If Reloader finds any change in new configmap object, only then, it moves forward with rolling upgrade.
43
43
44
44
After that, Reloader gets the list of all `deployments`, `daemonsets` and `statefulset` and looks for above mentioned annotation for configmap. If the annotation value contains the configmap name, it then looks for an environment variable which can contain the configmap or secret data change hash.
45
45
46
-
### Environment variable for Configmap
46
+
### Environment Variable for ConfigMap
47
47
48
48
If configmap name is foo then
49
49
50
50
```yaml
51
51
STAKATER_FOO_CONFIGMAP
52
52
```
53
53
54
-
### Environment variable for Secret
54
+
### Environment Variable for Secret
55
55
56
56
If Secret name is foo then
57
57
@@ -63,7 +63,7 @@ If the environment variable is found then it gets its value and compares it with
63
63
64
64
Note: Rolling upgrade also works in the same way for secrets.
65
65
66
-
### Hash value Computation
66
+
### Hash Value Computation
67
67
68
68
Reloader uses SHA1 to compute hash value. SHA1 is used because it is efficient and less prone to collision.
69
69
@@ -77,6 +77,6 @@ helm --namespace {replace this with namespace name} template . > reloader.yaml
77
77
78
78
The output file can then be used to deploy Reloader in specific namespace.
79
79
80
-
## Compatibility with helm install and upgrade
80
+
## Compatibility With Helm Install and Upgrade
81
81
82
82
Reloader has no impact on helm deployment cycle. Reloader only injects an environment variable in `deployment`, `daemonset` or `statefulset`. The environment variable contains the SHA1 value of configmap's or secret's data. So if a deployment is created using Helm and Reloader updates the deployment, then next time you upgrade the helm release, Reloader will do nothing except changing that environment variable value in `deployment` , `daemonset` or `statefulset`.
Copy file name to clipboardExpand all lines: docs/Verify-Reloader-Working.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Reloader's working can be verified by three ways.
4
4
5
-
## Verify from logs
5
+
## Verify From Logs
6
6
7
7
Check the logs of Reloader and verify that you can see logs looks like below, if you are able to find these logs then it means Reloader is working.
8
8
@@ -14,11 +14,11 @@ Updated test-resource of type Deployment in namespace: test-reloader
14
14
15
15
Below are the details that explain these logs:
16
16
17
-
### test-object
17
+
### `test-object`
18
18
19
19
`test-object` is the name of a `secret` or a `deployment` in which change has been detected.
20
20
21
-
### SECRET
21
+
### `SECRET`
22
22
23
23
`SECRET` is the type of `test-object`. It can either be `SECRET` or `CONFIGMAP`
24
24
@@ -30,27 +30,27 @@ Below are the details that explain these logs:
30
30
31
31
`test-resource` is the name of resource which is going to be updated
32
32
33
-
### Deployment
33
+
### `Deployment`
34
34
35
35
`Deployment` is the type of `test-resource`. It can either be a `Deployment`, `Daemonset` or `Statefulset`
36
36
37
-
## Verify by checking the age of Pod
37
+
## Verify by Checking the Age of Pod
38
38
39
39
A pod's age can tell whether Reloader is working correctly or not. If you know that a change in a `secret` or `configmap` has occurred, then check the relevant Pod's age immediately. It should be newly created few moments ago.
40
40
41
41
### Verify from Kubernetes Dashboard
42
42
43
43
`kubernetes dashboard` can be used to verify the working of Reloader. After a change in `secret` or `configmap`, check the relevant Pod's age from dashboard. It should be newly created few moments ago.
44
44
45
-
### Verify from command line
45
+
### Verify from Command Line
46
46
47
47
After a change in `secret` or `configmap`. Run the below-mentioned command and verify that the pod is newly created.
48
48
49
49
```bash
50
50
kubectl get pods <pod name> -n <namespace name>
51
51
```
52
52
53
-
## Verify from metrics
53
+
## Verify From Metrics
54
54
55
55
Some metrics are exported to Prometheus endpoint `/metrics` on port `9090`.
0 commit comments