{{ template "chart.header" . }} {{ template "chart.deprecationWarning" . }} {{ template "chart.badgesSection" . }} {{ template "chart.description" . }} {{ template "chart.homepageLine" . }} The annotation-based autodiscovery feature adds scrape targets based on Kubernetes annotations. ## How it works With this feature enabled, any Kubernetes Pods or Services with the `k8s.grafana.com/scrape` annotation set to `true` will be automatically discovered and scraped by the collector. You can use several other annotations to customize the behavior of the scrape configuration, such as: * `k8s.grafana.com/job`: The value to use for the `job` label. * `k8s.grafana.com/instance`: The value to use for the `instance` label. * `k8s.grafana.com/metrics.path`: The path to scrape for metrics. Defaults to `/metrics`. * `k8s.grafana.com/metrics.portNumber`: The port on the Pod or Service to scrape for metrics. This is used to target a specific port by its number, rather than all ports. * `k8s.grafana.com/metrics.portName`: The named port on the Pod or Service to scrape for metrics. This is used to target a specific port by its name, rather than all ports. * `k8s.grafana.com/metrics.scheme`: The scheme to use when scraping metrics. Defaults to `http`. * `k8s.grafana.com/metrics.scrapeInterval`: The scrape interval to use when scraping metrics. Defaults to `60s`. ## Testing This chart contains unit tests to verify the generated configuration. The hidden value `deployAsConfigMap` will render the generated configuration into a ConfigMap object. While this ConfigMap is not used during regular operation, you can use it to show the outcome of a given values file. The unit tests use this ConfigMap to create an object with the configuration that can be asserted against. To run the tests, use `helm test`. Be sure perform actual integration testing in a live environment in the main [k8s-monitoring](../..) chart. {{ template "chart.maintainersSection" . }} {{ template "chart.sourcesSection" . }} {{ template "chart.requirementsSection" . }} {{ template "chart.valuesSection" . }}