Skip to content

Commit ba2db53

Browse files
committed
Improve documentation and logging for labels selectors
1 parent ee12df2 commit ba2db53

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

README.md

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

298298
> **⚠️ Note:**
299299
> Only **one** resource type can be ignored at a time.
@@ -304,7 +304,7 @@ Reloader supports multiple strategies for triggering rolling updates when a watc
304304

305305
| Flag | Description |
306306
|------|-------------|
307-
| `--namespace-selector=key=value` | Watch only namespaces with matching labels |
307+
| `--namespace-selector=key=value` | Watch only namespaces whose labels match this selector |
308308
| `--namespaces-to-ignore=ns1,ns2` | Skip specific namespaces from being watched |
309309

310310
#### 4. 📝 Annotation Key Overrides

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)