Skip to content

Commit 7a185bc

Browse files
committed
Improve resource / namespace selector documentation and logging
1 parent 662e1fc commit 7a185bc

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ Reloader supports multiple strategies for triggering rolling updates when a watc
294294
|------|-------------|
295295
| `--resources-to-ignore=configmaps` | Ignore ConfigMaps (only one type can be ignored at a time) |
296296
| `--resources-to-ignore=secrets` | Ignore Secrets (cannot combine with configMaps) |
297-
| `--resource-label-selector=key=value` | Only watch ConfigMaps/Secrets with matching labels |
297+
| `--resource-label-selector=key=value` | Only watch ConfigMaps/Secrets whose labels match this selector |
298298

299299
> **⚠️ Note:**
300300
> Only **one** resource type can be ignored at a time.

deployments/kubernetes/chart/reloader/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ helm uninstall {{RELEASE_NAME}} -n {{NAMESPACE}}
5353
| `reloader.reloadStrategy` | Strategy to trigger resource restart, set to either `default`, `env-vars` or `annotations` | enumeration | `default` |
5454
| `reloader.ignoreNamespaces` | List of comma separated namespaces to ignore, if multiple are provided, they are combined with the AND operator | string | `""` |
5555
| `reloader.namespaceSelector` | List of comma separated k8s label selectors for namespaces selection. See [LIST and WATCH filtering](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#list-and-watch-filtering) for more details on label-selector | string | `""` |
56-
| `reloader.resourceLabelSelector` | List of comma separated label selectors, if multiple are provided they are combined with the AND operator | string | `""` |
56+
| `reloader.resourceLabelSelector` | Only watch ConfigMaps/Secrets whose labels match this selector | string | `""` |
5757
| `reloader.logFormat` | Set type of log format. Value could be either `json` or `""` | string | `""` |
5858
| `reloader.watchGlobally` | Allow Reloader to watch in all namespaces (`true`) or just in a single namespace (`false`) | boolean | `true` |
5959
| `reloader.enableHA` | Enable leadership election allowing you to run multiple replicas | boolean | `false` |

deployments/kubernetes/chart/reloader/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ reloader:
3434
syncAfterRestart: false
3535
reloadStrategy: default # Set to default, env-vars or annotations
3636
ignoreNamespaces: "" # Comma separated list of namespaces to ignore
37-
namespaceSelector: "" # Comma separated list of k8s label selectors for namespaces selection
38-
resourceLabelSelector: "" # Comma separated list of k8s label selectors for configmap/secret selection
37+
namespaceSelector: "" # Label selector for namespaces selection
38+
resourceLabelSelector: "" # Label selector for configmap/secret selection
3939
logFormat: "" # json
4040
logLevel: info # Log level to use (trace, debug, info, warning, error, fatal and panic)
4141
watchGlobally: true

internal/pkg/cmd/reloader.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,11 @@ func startReloader(cmd *cobra.Command, args []string) {
161161
}
162162

163163
if len(namespaceLabelSelector) > 0 {
164-
logrus.Warnf("namespace-selector is set, will only detect changes in namespaces with these labels: %s.", namespaceLabelSelector)
164+
logrus.Warnf("namespace-selector is set, will only detect changes in namespaces whose labels match this selector: %s.", namespaceLabelSelector)
165165
}
166166

167167
if len(resourceLabelSelector) > 0 {
168-
logrus.Warnf("resource-label-selector is set, will only detect changes on resources with these labels: %s.", resourceLabelSelector)
168+
logrus.Warnf("resource-label-selector is set, will only detect changes on resources whose labels match this selector: %s.", resourceLabelSelector)
169169
}
170170

171171
if options.WebhookUrl != "" {

0 commit comments

Comments
 (0)