Skip to content

Commit fc60755

Browse files
fdberlkingBenjamin Walterscheidkarl-johan-grahn
authoredApr 5, 2024
issue/562 - enhance documentation for Reloader Chart values.yaml (#620)
* issue/562 - enhance documentation for Reloader Chart values.yaml Signed-off-by: Benjamin Walterscheid <benjamin.walterscheid@de.ibm.com> * issue/562 - aligned unordered list indentation Signed-off-by: Benjamin Walterscheid <benjamin.walterscheid@de.ibm.com> * issue/562 - removed leading reloader due to QA spell check issues Signed-off-by: Benjamin Walterscheid <benjamin.walterscheid@de.ibm.com> * issue/562 - updated failing qa / spell_check README checks Signed-off-by: Benjamin Walterscheid <benjamin.walterscheid@de.ibm.com> * issue/562 - updated failing qa / spell_check README checks Signed-off-by: Benjamin Walterscheid <benjamin.walterscheid@de.ibm.com> * issue/562 - updated failing qa / spell_check README checks Signed-off-by: Benjamin Walterscheid <benjamin.walterscheid@de.ibm.com> * issue/562 - changed from helm to bash where needed Signed-off-by: Benjamin Walterscheid <52604859+fdberlking@users.noreply.github.com> --------- Signed-off-by: Benjamin Walterscheid <benjamin.walterscheid@de.ibm.com> Signed-off-by: Benjamin Walterscheid <52604859+fdberlking@users.noreply.github.com> Co-authored-by: Benjamin Walterscheid <benjamin.walterscheid@de.ibm.com> Co-authored-by: Karl-Johan Grahn <6355577+karl-johan-grahn@users.noreply.github.com>
1 parent 920cf8c commit fc60755

File tree

1 file changed

+98
-51
lines changed

1 file changed

+98
-51
lines changed
 

‎README.md

+98-51
Original file line numberDiff line numberDiff line change
@@ -266,69 +266,116 @@ namespace: reloader
266266

267267
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. Follow [this](docs/Helm2-to-Helm3.md) guide, in case you have trouble migrating Reloader from Helm2 to Helm3.
268268

269+
#### Installation
270+
269271
```bash
270272
helm repo add stakater https://stakater.github.io/stakater-charts
271273
272274
helm repo update
273275
274276
helm install stakater/reloader # For helm3 add --generate-name flag or set the release name
275-
```
276277
277-
**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`, `Daemonsets` `Statefulsets` and `Rollouts` in `test` namespace.
278+
helm install {{RELEASE_NAME}} stakater/reloader -n {{NAMESPACE}} --set reloader.watchGlobally=false # By default, Reloader watches in all namespaces. To watch in single namespace, set watchGlobally=false
278279
279-
```bash
280-
helm install stakater/reloader --set reloader.watchGlobally=false --namespace test # For helm3 add --generate-name flag or set the release name
280+
helm install stakater/reloader --set reloader.watchGlobally=false --namespace test --generate-name # Install Reloader in `test` namespace which will only watch `Deployments`, `Daemonsets` `Statefulsets` and `Rollouts` in `test` namespace.
281281
```
282282

283-
Reloader can be configured to ignore the resources `secrets` and `configmaps` by using the following parameters of `values.yaml` file:
284-
285-
| Parameter | Description | Type | Default |
286-
|------------------|----------------------------------------------------------------|---------|---------|
287-
| ignoreSecrets | To ignore secrets. Valid value are either `true` or `false` | boolean | false |
288-
| ignoreConfigMaps | To ignore configMaps. Valid value are either `true` or `false` | boolean | false |
289-
290-
**Note:** At one time only one of these resource can be ignored, trying to do it will cause error in helm template compilation.
291-
292-
Reloader can be configured to only watch namespaces labeled with one or more labels using the `namespaceSelector` parameter
293-
294-
| Parameter | Description | Type | Default |
295-
|-------------------|-----------------------------------------------------------------------------------------------------------|--------|---------|
296-
| namespaceSelector | list of comma separated label selectors, if multiple are provided they are combined with the AND operator | string | "" |
297-
298-
Reloader can be configured to only watch configmaps/secrets labeled with one or more labels using the `resourceLabelSelector` parameter
299-
300-
| Parameter | Description | Type | Default |
301-
|-----------------------|-----------------------------------------------------------------------------------------------------------|--------|---------|
302-
| resourceLabelSelector | list of comma separated label selectors, if multiple are provided they are combined with the AND operator | string | "" |
303-
304-
**Note:** Both `namespaceSelector` & `resourceLabelSelector` can be used together. If they are then both conditions must be met for the configmap or secret to be eligible to trigger reload events. (e.g. If a configMap matches `resourceLabelSelector` but `namespaceSelector` does not match the namespace the configmap is in, it will be ignored).
283+
#### Uninstalling
305284

306-
You can also set the log format of Reloader to JSON by setting `logFormat` to `json` in `values.yaml` and apply the chart.
307-
308-
You can enable to scrape Reloader's Prometheus metrics by setting `serviceMonitor.enabled` or `podMonitor.enabled` to `true` in `values.yaml` file. Service monitor will be removed in future releases of Reloader in favour of Pod monitor.
309-
310-
**Note:** Reloading of OpenShift (DeploymentConfig) and/or Argo `Rollouts` has to be enabled explicitly because it might not be always possible to use it on a cluster with restricted permissions. This can be done by changing the following parameters:
311-
312-
| Parameter | Description | Type | Default |
313-
|------------------|--------------------------------------------------------------------------------------------------------------------------------------------|---------|---------|
314-
| isOpenshift | Enable OpenShift DeploymentConfigs. Valid value are either `true` or `false` | boolean | false |
315-
| isArgoRollouts | Enable Argo `Rollouts`. Valid value are either `true` or `false` | boolean | false |
316-
| reloadOnCreate | Enable reload on create events. Valid value are either `true` or `false` | boolean | false |
317-
| syncAfterRestart | Enable sync after Reloader restarts for **Add** events, works only when reloadOnCreate is `true`. Valid value are either `true` or `false` | boolean | false |
318-
319-
**isOpenShift** Recent versions of OpenShift (tested on 4.13.3) require the specified user to be in an `uid` range which is dynamically assigned by the namespace. The solution is to unset the runAsUser variable via ``deployment.securityContext.runAsUser=null`` and let OpenShift assign it at install.
320-
321-
**reloadOnCreate** controls how Reloader handles secrets being added to the cache for the first time. If reloadOnCreate is set to true:
322-
323-
- Configmaps/secrets being added to the cache will cause Reloader to perform a rolling update of the associated workload.
324-
- When applications are deployed for the first time, Reloader will perform a rolling update of the associated workload.
325-
- If you are running Reloader in HA mode all workloads will have a rolling update performed when a new leader is elected.
326-
327-
If reloadOnCreate is set to false:
328-
329-
- Updates to configMaps/Secrets that occur while there is no leader will not be picked up by the new leader until a subsequent update of the configmap/secret occurs. In the worst case the window in which there can be no leader is 15s as this is the LeaseDuration.
285+
```bash
286+
helm uninstall {{RELEASE_NAME}} -n {{NAMESPACE}}
287+
```
330288

331-
**Note:** By default, **reloadOnCreate** and **syncAfterRestart** are both set to false. Both need to be enabled explicitly.
289+
### Parameters
290+
291+
#### Global Parameters
292+
293+
| Parameter | Description | Type | Default |
294+
|---------------------------|-----------------------------------------------------------------|-------|---------|
295+
| `global.imagePullSecrets` | Reference to one or more secrets to be used when pulling images | array | `[]` |
296+
297+
#### Common Parameters
298+
299+
| Parameter | Description | Type | Default |
300+
|--------------------|-------------------------------|--------|---------|
301+
| `nameOverride` | replace the name of the chart | string | `""` |
302+
| `fullnameOverride` | replace the generated name | string | `""` |
303+
304+
#### Core Reloader Parameters
305+
306+
| Parameter | Description | Type | Default |
307+
|-----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|-------------|-----------|
308+
| `reloader.autoReloadAll` | | boolean | `false` |
309+
| `reloader.isArgoRollouts` | Enable Argo `Rollouts`. Valid value are either `true` or `false` | boolean | `false` |
310+
| `reloader.isOpenshift` | Enable OpenShift DeploymentConfigs. Valid value are either `true` or `false` | boolean | `false` |
311+
| `reloader.ignoreSecrets` | To ignore secrets. Valid value are either `true` or `false`. Either `ignoreSecrets` or `ignoreConfigMaps` can be ignored, not both at the same time | boolean | `false` |
312+
| `reloader.ignoreConfigMaps` | To ignore configMaps. Valid value are either `true` or `false` | boolean | `false` |
313+
| `reloader.reloadOnCreate` | Enable reload on create events. Valid value are either `true` or `false` | boolean | `false` |
314+
| `reloader.syncAfterRestart` | Enable sync after Reloader restarts for **Add** events, works only when reloadOnCreate is `true`. Valid value are either `true` or `false` | boolean | `false` |
315+
| `reloader.reloadStrategy` | Strategy to trigger resource restart, set to either `default`, `env-vars` or `annotations` | enumeration | `default` |
316+
| `reloader.ignoreNamespaces` | List of comma separated namespaces to ignore, if multiple are provided, they are combined with the AND operator | string | `""` |
317+
| `reloader.namespaceSelector` | List of comma separated namespaces to select, if multiple are provided, they are combined with the AND operator | string | `""` |
318+
| `reloader.resourceLabelSelector` | List of comma separated label selectors, if multiple are provided they are combined with the AND operator | string | `""` |
319+
| `reloader.logFormat` | Set type of log format. Value could be either `json` or `""` | string | `""` |
320+
| `reloader.watchGlobally` | Allow Reloader to watch in all namespaces (`true`) or just in a single namespace (`false`) | boolean | `true` |
321+
| `reloader.enableHA` | Enable leadership election allowing you to run multiple replicas | boolean | `false` |
322+
| `reloader.readOnlyRootFileSystem` | Enforce readOnlyRootFilesystem | boolean | `false` |
323+
| `reloader.legacy.rbac` | | boolean | `false` |
324+
| `reloader.matchLabels` | Pod labels to match | map | `{}` |
325+
326+
#### Deployment Reloader Parameters
327+
328+
| Parameter | Description | Type | Default |
329+
|-------------------------------------------------|-----------------------------------------------------------------------------------------|--------|-------------------|
330+
| `reloader.deployment.replicas` | Number of replicas, if you wish to run multiple replicas set `reloader.enableHA = true` | int | 1 |
331+
| `reloader.deployment.revisionHistoryLimit` | Limit the number of revisions retained in the revision history | int | 2 |
332+
| `reloader.deployment.nodeSelector` | Scheduling pod to a specific node based on set labels | map | `{}` |
333+
| `reloader.deployment.affinity` | Set affinity rules on pod | map | `{}` |
334+
| `reloader.deployment.securityContext` | Set pod security context | map | `{}` |
335+
| `reloader.deployment.containerSecurityContext` | Set container security context | map | `{}` |
336+
| `reloader.deployment.tolerations` | A list of `tolerations` to be applied to the deployment | array | `[]` |
337+
| `reloader.deployment.topologySpreadConstraints` | Topology spread constraints for pod assignment | array | `[]` |
338+
| `reloader.deployment.annotations` | Set deployment annotations | map | `{}` |
339+
| `reloader.deployment.labels` | Set deployment labels, default to stakater settings | array | `see values.yaml` |
340+
| `reloader.deployment.image` | Set container image name, tag and policy | array | `see values.yaml` |
341+
| `reloader.deployment.env` | Support for extra environment variables | array | `[]` |
342+
| `reloader.deployment.livenessProbe` | Set liveness probe timeout values | map | `{}` |
343+
| `reloader.deployment.readinessProbe` | Set readiness probe timeout values | map | `{}` |
344+
| `reloader.deployment.resources` | Set container requests and limits (e.g. CPU or memory) | map | `{}` |
345+
| `reloader.deployment.pod.annotations` | Set annotations for pod | map | `{}` |
346+
| `reloader.deployment.priorityClassName` | Set priority class for pod in cluster | string | `""` |
347+
348+
#### Other Reloader Parameters
349+
350+
| Parameter | Description | Type | Default |
351+
|----------------------------------------|-----------------------------------------------------------------|---------|---------|
352+
| `reloader.service` | | map | `{}` |
353+
| `reloader.rbac.enabled` | Specifies whether a role based access control should be created | boolean | `true` |
354+
| `reloader.serviceAccount.create` | Specifies whether a ServiceAccount should be created | boolean | `true` |
355+
| `reloader.custom_annotations` | Add custom annotations | map | `{}` |
356+
| `reloader.serviceMonitor.enabled` | Enable to scrape Reloader's Prometheus metrics (legacy) | boolean | `false` |
357+
| `reloader.podMonitor.enabled` | Enable to scrape Reloader's Prometheus metrics | boolean | `false` |
358+
| `reloader.podDisruptionBudget.enabled` | Limit the number of pods of a replicated application | boolean | `false` |
359+
| `reloader.netpol.enabled` | | boolean | `false` |
360+
| `reloader.volumeMounts` | Mount volume | array | `[]` |
361+
| `reloader.volumes` | Add volume to a pod | array | `[]` |
362+
| `reloader.webhookUrl` | Add webhook to Reloader | string | `""` |
363+
364+
#### Additional Remarks
365+
366+
- Both `namespaceSelector` & `resourceLabelSelector` can be used together. If they are then both conditions must be met for the configmap or secret to be eligible to trigger reload events. (e.g. If a configMap matches `resourceLabelSelector` but `namespaceSelector` does not match the namespace the configmap is in, it will be ignored).
367+
- At one time only one of the resources `ignoreConfigMaps` or `ignoreSecrets` can be ignored, trying to do both will cause error in helm template compilation
368+
- Reloading of OpenShift (DeploymentConfig) and/or Argo `Rollouts` has to be enabled explicitly because it might not be always possible to use it on a cluster with restricted permissions
369+
- `isOpenShift` Recent versions of OpenShift (tested on 4.13.3) require the specified user to be in an `uid` range which is dynamically assigned by the namespace. The solution is to unset the runAsUser variable via ``deployment.securityContext.runAsUser=null`` and let OpenShift assign it at install
370+
- `reloadOnCreate` controls how Reloader handles secrets being added to the cache for the first time. If `reloadOnCreate` is set to true:
371+
1. Configmaps/secrets being added to the cache will cause Reloader to perform a rolling update of the associated workload
372+
1. When applications are deployed for the first time, Reloader will perform a rolling update of the associated workload
373+
1. If you are running Reloader in HA mode all workloads will have a rolling update performed when a new leader is elected
374+
- `serviceMonitor` will be removed in future releases of Reloader in favour of Pod monitor
375+
- If `reloadOnCreate` is set to false:
376+
1. Updates to configmaps/secrets that occur while there is no leader will not be picked up by the new leader until a subsequent update of the configmap/secret occurs
377+
1. In the worst case the window in which there can be no leader is 15s as this is the LeaseDuration
378+
- By default, `reloadOnCreate` and `syncAfterRestart` are both set to false. Both need to be enabled explicitly
332379

333380
## Help
334381

0 commit comments

Comments
 (0)
Please sign in to comment.