Skip to content

Commit

Permalink
Update discovery.kubernetes.md (#4522)
Browse files Browse the repository at this point in the history
* Update discovery.kubernetes.md

Added selectors section to the Limited Searched Namespaces section and changed the description of the section to add the specific labels aspect.

* Update docs/sources/flow/reference/components/discovery.kubernetes.md

Co-authored-by: Clayton Cornell <[email protected]>

* Update docs/sources/flow/reference/components/discovery.kubernetes.md

Co-authored-by: Mischa Thompson <[email protected]>

* Update docs/sources/flow/reference/components/discovery.kubernetes.md

Co-authored-by: Mischa Thompson <[email protected]>

* Minor fix to remove full stop

---------

Co-authored-by: Clayton Cornell <[email protected]>
Co-authored-by: Mischa Thompson <[email protected]>
  • Loading branch information
3 people authored Jul 25, 2023
1 parent bfb5638 commit 3e2c52f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/sources/flow/reference/components/discovery.kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,13 +415,19 @@ Replace the following:
- `USERNAME`: The username to use for authentication to the remote_write API.
- `PASSWORD`: The password to use for authentication to the remote_write API.

### Limit searched namespaces
### Limit searched namespaces and filter by labels value

This example limits the namespaces where pods are discovered using the `namespaces` block:
This example limits the searched namespaces and only selects pods with a specific label value attached to them:

```river
discovery.kubernetes "k8s_pods" {
role = "pod"
selectors {
role = "pod"
label = "app.kubernetes.io/name=prometheus-node-exporter"
}
namespaces {
names = ["myapp"]
}
Expand Down

0 comments on commit 3e2c52f

Please sign in to comment.