Skip to content

Commit da9e526

Browse files
authoredApr 27, 2024··
update (#650)
1 parent 9a9fee2 commit da9e526

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed
 

‎docs/Helm2-to-Helm3.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ There are 3 steps involved in migrating the Reloader from Helm2 to Helm3.
88

99
### Step 1
1010

11-
Install the helm-2to3 plugin
11+
Install the `helm-2to3` plugin
1212

1313
```bash
1414
helm3 plugin install https://github.com/helm/helm-2to3

‎docs/How-it-works.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# How does Reloader work?
1+
# How Does Reloader Work?
22

33
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`.
44

5-
## How change detection works
5+
## How Change Detection Works
66

77
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.
88

9-
## Requirements for rolling upgrade
9+
## Requirements for Rolling Upgrade
1010

1111
To perform rolling upgrade a `deployment`, `daemonset` or `statefulset` must have
1212

@@ -37,21 +37,21 @@ metadata:
3737

3838
Above mentioned annotation are also work for `Daemonsets` `Statefulsets` and `Rollouts`
3939

40-
## How Rolling upgrade works?
40+
## How Does Rolling Upgrade Work?
4141

4242
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.
4343

4444
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.
4545

46-
### Environment variable for Configmap
46+
### Environment Variable for ConfigMap
4747

4848
If configmap name is foo then
4949

5050
```yaml
5151
STAKATER_FOO_CONFIGMAP
5252
```
5353

54-
### Environment variable for Secret
54+
### Environment Variable for Secret
5555

5656
If Secret name is foo then
5757

@@ -63,7 +63,7 @@ If the environment variable is found then it gets its value and compares it with
6363

6464
Note: Rolling upgrade also works in the same way for secrets.
6565

66-
### Hash value Computation
66+
### Hash Value Computation
6767

6868
Reloader uses SHA1 to compute hash value. SHA1 is used because it is efficient and less prone to collision.
6969

@@ -77,6 +77,6 @@ helm --namespace {replace this with namespace name} template . > reloader.yaml
7777

7878
The output file can then be used to deploy Reloader in specific namespace.
7979

80-
## Compatibility with helm install and upgrade
80+
## Compatibility With Helm Install and Upgrade
8181

8282
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`.

‎docs/Reloader-vs-k8s-trigger-controller.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Reloader and k8s-trigger-controller are both built for same purpose. So there ar
2121

2222
Reloader supports deployment `rollout` as well as `daemonsets` and `statefulsets` `rollout`.
2323

24-
### Hashing usage
24+
### Hashing Usage
2525

2626
#### `k8s-trigger-controller`
2727

‎docs/Verify-Reloader-Working.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Reloader's working can be verified by three ways.
44

5-
## Verify from logs
5+
## Verify From Logs
66

77
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.
88

@@ -14,11 +14,11 @@ Updated test-resource of type Deployment in namespace: test-reloader
1414

1515
Below are the details that explain these logs:
1616

17-
### test-object
17+
### `test-object`
1818

1919
`test-object` is the name of a `secret` or a `deployment` in which change has been detected.
2020

21-
### SECRET
21+
### `SECRET`
2222

2323
`SECRET` is the type of `test-object`. It can either be `SECRET` or `CONFIGMAP`
2424

@@ -30,27 +30,27 @@ Below are the details that explain these logs:
3030

3131
`test-resource` is the name of resource which is going to be updated
3232

33-
### Deployment
33+
### `Deployment`
3434

3535
`Deployment` is the type of `test-resource`. It can either be a `Deployment`, `Daemonset` or `Statefulset`
3636

37-
## Verify by checking the age of Pod
37+
## Verify by Checking the Age of Pod
3838

3939
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.
4040

4141
### Verify from Kubernetes Dashboard
4242

4343
`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.
4444

45-
### Verify from command line
45+
### Verify from Command Line
4646

4747
After a change in `secret` or `configmap`. Run the below-mentioned command and verify that the pod is newly created.
4848

4949
```bash
5050
kubectl get pods <pod name> -n <namespace name>
5151
```
5252

53-
## Verify from metrics
53+
## Verify From Metrics
5454

5555
Some metrics are exported to Prometheus endpoint `/metrics` on port `9090`.
5656

0 commit comments

Comments
 (0)
Please sign in to comment.