Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 13 additions & 64 deletions charts/netdata/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -598,41 +598,14 @@ false
<th>Description</th>
</thead>
<tbody>
<tr>
<td>sd.image.repository</td>
<td>string</td>
<td><pre lang="json">
"netdata/agent-sd"
</pre>
</td>
<td>Container image repository</td>
</tr>
<tr>
<td>sd.image.tag</td>
<td>string</td>
<td><pre lang="json">
"v0.2.10"
</pre>
</td>
<td>Container image tag</td>
</tr>
<tr>
<td>sd.image.pullPolicy</td>
<td>string</td>
<td><pre lang="json">
"Always"
</pre>
</td>
<td>Container image pull policy</td>
</tr>
<tr>
<td>sd.child.enabled</td>
<td>bool</td>
<td><pre lang="json">
true
</pre>
</td>
<td>Add service-discovery sidecar container to the netdata child pod definition</td>
<td>Enable Kubernetes service discovery on each Netdata child</td>
</tr>
<tr>
<td>sd.child.configmap.name</td>
Expand Down Expand Up @@ -670,15 +643,6 @@ true
</td>
<td>Value to use for child service-discovery configuration generation</td>
</tr>
<tr>
<td>sd.child.resources</td>
<td>object</td>
<td><pre lang="">
See values.yaml for defaults
</pre>
</td>
<td>Child service-discovery container CPU/Memory resource requests/limits</td>
</tr>
</tbody>
</table>
<h3>Parent</h3>
Expand Down Expand Up @@ -2443,9 +2407,9 @@ pointing at the `netdata-otel` service.

### Service discovery and supported services

Netdata's [service discovery](https://github.com/netdata/agent-service-discovery/), which is installed as part of the
Helm chart installation, finds what services are running on a cluster's pods, converts that into configuration files,
and exports them, so they can be monitored.
Each Netdata child watches pods on its own node and creates collector jobs for matching containers.
The chart mounts the discovery rules at `/etc/netdata/go.d/sd/k8s.conf`. The bundled rules require
Netdata Agent v2.12.3 or later. [Kubernetes discovery documentation](https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/discovery/sdext/discoverer/k8ssd/README.md).

#### Applications

Expand Down Expand Up @@ -2478,42 +2442,27 @@ Service discovery currently supports the following applications via their associ
Service discovery supports Prometheus endpoints via
the [Prometheus](https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/collector/prometheus/README.md) collector.

Annotations on pods allow a fine control of the scraping process:
The generic Prometheus rule reads the following pod annotations.

- `prometheus.io/scrape`: The default configuration will scrape all pods and, if set to false, this annotation excludes
the pod from the scraping process.
- `prometheus.io/path`: If the metrics path is not _/metrics_, define it with this annotation.
- `prometheus.io/port`: Scrape the pod on the indicated port instead of the pod's declared ports.
- `prometheus.io/scrape` opts a pod into scraping when set to `"true"`.
- `prometheus.io/path` sets the metrics path. It defaults to `/metrics`.
- `prometheus.io/port` selects a matching declared container port. Omit it to use each discovered port.

#### Configure service discovery

If your cluster runs services on non-default ports or uses non-default names, you may need to configure service
discovery to start collecting metrics from your services. You have to edit
the [default ConfigMap](https://github.com/netdata/helmchart/blob/master/charts/netdata/sdconfig/child.yml) that is shipped with the
Helmchart and deploy that to your cluster.

First, copy `netdata-helmchart/charts/netdata/sdconfig/child.yml` to a new location outside the `netdata-helmchart` directory. The
destination can be anywhere you like, but the following examples assume it resides next to the `netdata-helmchart`
directory.
To change an image match, port, or collector setting, copy the bundled rules from your chart checkout.
[Default discovery rules](https://github.com/netdata/helmchart/blob/master/charts/netdata/sdconfig/k8s.yml).

```bash
cp netdata-helmchart/charts/netdata/sdconfig/child.yml .
cp netdata-helmchart/charts/netdata/sdconfig/k8s.yml .
```

Edit the new `child.yml` file according to your needs. See
the [Helm chart configuration](https://github.com/netdata/helmchart#configuration) and the file itself for details. You
can then run
`helm install`/`helm upgrade` with the `--set-file` argument to use your configured `child.yml` file instead of the
default, changing the path if you copied it elsewhere.
Edit `k8s.yml`, then pass it to Helm when installing or upgrading the release.

```bash
helm install --set-file sd.child.configmap.from.value=./child.yml netdata ./netdata-helmchart/charts/netdata
helm upgrade --set-file sd.child.configmap.from.value=./child.yml netdata ./netdata-helmchart/charts/netdata
helm upgrade --install netdata ./netdata-helmchart/charts/netdata --set-file sd.child.configmap.from.value=./k8s.yml
```

Now that you pushed an edited ConfigMap to your cluster, service discovery should find and set up metrics collection
from your non-default service.

### Custom pod labels and annotations

Occasionally, you will want to add
Expand Down
243 changes: 0 additions & 243 deletions charts/netdata/sdconfig/child.yml

This file was deleted.

Loading
Loading