Skip to content

Commit

Permalink
Update discovery.kubernetes.md (#4522) (#4584)
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]>
(cherry picked from commit 3e2c52f)

Co-authored-by: Devin H <[email protected]>
  • Loading branch information
grafanabot and dhalperin authored Jul 25, 2023
1 parent e76d054 commit b7cb3f8
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 @@ -362,13 +362,19 @@ discovery.kubernetes "k8s_pods" {
}
```

### 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 b7cb3f8

Please sign in to comment.