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: README.md
+45-8Lines changed: 45 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,8 @@ metadata:
31
31
annotations:
32
32
reloader.stakater.com/auto: "true"
33
33
spec:
34
-
template: metadata:
34
+
template:
35
+
metadata:
35
36
```
36
37
37
38
This will discover deploymentconfigs/deployments/daemonsets/statefulset/rollouts automatically where `foo-configmap` or `foo-secret` is being used either via environment variable or from volume mount. And it will perform rolling upgrade on related pods when `foo-configmap` or `foo-secret`are updated.
Use comma separated list to define multiple configmaps.
@@ -141,6 +143,7 @@ spec:
141
143
- you may override the configmap annotation with the `--configmap-annotation` flag
142
144
- you may override the secret annotation with the `--secret-annotation` flag
143
145
- you may want to prevent watching certain namespaces with the `--namespaces-to-ignore` flag
146
+
- you may want to watch only a set of namespaces with certain labels by using the `--namespace-selector` flag
144
147
- you may want to prevent watching certain resources with the `--resources-to-ignore` flag
145
148
- you can configure logging in JSON format with the `--log-format=json` option
146
149
- you can configure the "reload strategy" with the `--reload-strategy=<strategy-name>` option (details below)
@@ -180,6 +183,25 @@ Reloader can be configured to ignore the resources `secrets` and `configmaps` by
180
183
181
184
`Note`: At one time only one of these resource can be ignored, trying to do it will cause error in Reloader. Workaround for ignoring both resources is by scaling down the reloader pods to `0`.
182
185
186
+
Reloader can be configured to watch only namespaces labeled with (one or more) labels of your choosing by using the `--namespace-selector` parameter, for example:
187
+
```
188
+
--namespace-selector=reloder:enabled,test:true
189
+
```
190
+
191
+
Only namespaces labeled like the following namespace YAML will be watched:
192
+
```yaml
193
+
kind: Namespace
194
+
apiVersion: v1
195
+
metadata:
196
+
...
197
+
labels:
198
+
reloder: enabled
199
+
test: true
200
+
...
201
+
```
202
+
If you want to select namespace only by the key of the label use ```*``` as the value.
203
+
For example, for ```--namespace-selector=select-this:*``` all namespaces with label-key "select-this" will be selected regardless of the labels value
204
+
183
205
### Vanilla kustomize
184
206
185
207
You can also apply the vanilla manifests by running the following command
@@ -231,17 +253,32 @@ Reloader can be configured to ignore the resources `secrets` and `configmaps` by
231
253
232
254
`Note`: At one time only one of these resource can be ignored, trying to do it will cause error in helm template compilation.
233
255
256
+
Reloader can be configured to watch only namespaces labeled with (one or more) labels of your choosing by using the `namespaceSelector` parameter
| namespaceSelector | list of comma separated key:value namespace | string |
261
+
234
262
You can also set the log format of Reloader to json by setting `logFormat` to `json` in values.yaml and apply the chart
235
263
236
264
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.
237
265
238
266
**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:
| isOpenshift | Enable OpenShift DeploymentConfigs. Valid value are either `true` or `false` | boolean |
271
+
| isArgoRollouts | Enable Argo Rollouts. Valid value are either `true` or `false` | boolean |
272
+
| reloadOnCreate | Enable reload on create events. Valid value are either `true` or `false` | boolean |
273
+
| syncAfterRestart | Enable sync after reloader restarts for **Add** events, works only when reloadOnCreate is `true`. Valid value are either `true` or `false` | boolean |
274
+
275
+
**ReloadOnCreate** reloadOnCreate controls how Reloader handles secrets being added to the cache for the first time. If reloadOnCreate is set to true:
276
+
* Configmaps/secrets being added to the cache will cause Reloader to perform a rolling update of the associated workload.
277
+
* When applications are deployed for the first time, Reloader will perform a rolling update of the associated workload.
278
+
* If you are running Reloader in HA mode all workloads will have a rolling update performed when a new leader is elected.
279
+
280
+
If ReloadOnCreate is set to false:
281
+
* 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.
245
282
246
283
## Help
247
284
@@ -251,7 +288,7 @@ You can find more documentation [here](docs)
251
288
252
289
### Have a question?
253
290
254
-
File a GitHub [issue](https://github.com/stakater/Reloader/issues), or send us an [email](mailto:stakater@gmail.com).
291
+
File a GitHub [issue](https://github.com/stakater/Reloader/issues), or send us an [email](mailto:hello@stakater.com).
0 commit comments