Skip to content

Commit

Permalink
Draft updates for watchNamespaceSelector
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Fekete <[email protected]>
  • Loading branch information
fekete-robert committed Aug 1, 2023
1 parent 998cc26 commit 3613548
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion content/docs/logging-infrastructure/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The `logging` resource defines the logging infrastructure for your cluster that

You can define multiple `logging` resources if needed, for example, if you want to run multiple Fluentd instances with separate configurations.

You can customize the configuration of Fluentd, syslog-ng, and Fluent Bit in the logging resource. It also declares `watchNamespaces` if applicable to narrow down the namespaces in which the logging operator should evaluate and incorporate `Flow` and `Output` resources into fluentd's configuration.
You can customize the configuration of Fluentd, syslog-ng, and Fluent Bit in the logging resource. The logging resource also declares `watchNamespaces`, that specifies the namespaces to include in the `Flow` and `Output` resources of Fluentd's configuration.

{{< include-headless "note-helm-chart-logging-resource.md" >}}

Expand Down Expand Up @@ -56,3 +56,19 @@ spec:
controlNamespace: logging
watchNamespaces: ["prod", "test"]
```
Starting with Logging operator version 4.3, you can use the `watchNamespaceSelector` selector to select the watched namespaces based on their label, or an expression, for example:

```yaml
watchNamespaceSelector:
matchLabels:
<label-name>: <label-value>
```

```yaml
watchNamespaceSelector:
matchExpressions:
FIXME-ADD-AN-EXAMPLE
```

If you set both `watchNamespaces` and `watchNamespaceSelector`, both take effect, and the matching namespaces are added to a single list.

0 comments on commit 3613548

Please sign in to comment.