Readme namespace selector

This commit is contained in:
Avi Huli
2022-12-22 14:28:15 +02:00
parent e702610dc6
commit de21a400ab
2 changed files with 23 additions and 1 deletions
+23
View File
@@ -183,6 +183,23 @@ Reloader can be configured to ignore the resources `secrets` and `configmaps` by
`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`.
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:
```
--namespace-selector=reloder:enabled,test:true
```
Only namespaces labeled like the following namespace YAML will be watched:
```yaml
kind: Namespace
apiVersion: v1
metadata:
...
labels:
reloder: enabled
test: true
...
```
### Vanilla kustomize
You can also apply the vanilla manifests by running the following command
@@ -234,6 +251,12 @@ Reloader can be configured to ignore the resources `secrets` and `configmaps` by
`Note`: At one time only one of these resource can be ignored, trying to do it will cause error in helm template compilation.
Reloader can be configured to watch only namespaces labeled with (one or more) labels of your choosing by using the `namespaceSelector` parameter
| Parameter | Description | Type |
| ---------------- | -------------------------------------------------------------- | ------- |
| namespaceSelector | list of comma separated key:value namespace | string |
You can also set the log format of Reloader to json by setting `logFormat` to `json` in values.yaml and apply the chart
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.
@@ -159,7 +159,6 @@ spec:
{{- if .Values.reloader.namespaceSelector }}
- "--namespace-selector={{ .Values.reloader.namespaceSelector }}"
{{- end }}
{{- if .Values.reloader.custom_annotations }}
{{- if .Values.reloader.custom_annotations.configmap }}
- "--configmap-annotation"