Skip to content
Snippets Groups Projects
Unverified Commit 55bad57e authored by Tom Wilkie's avatar Tom Wilkie Committed by GitHub
Browse files

Use __meta_kubernetes_pod_controller_name to ensure we scrape all pods. (#154)


* Add a scrape config for pods without name or app labels.

Signed-off-by: default avatarTom Wilkie <tom.wilkie@gmail.com>

* rebase with master and update to prefer name label but fallback to controller name

* Update scrape_config to use pod controller_name in the job

If a pod has a "name" label we use that in the job name. Otherwise,
- If the pod was created directly by a controller (statefulset,
  daemonset, job) then we use that controller_name.
- if the pod was created by controller created by a controller
  (deployment, cronJob) then we use the parent controller name.

- add a scrape_config.sh tool that generates the scrap_configs
  for promtail.sh and helm chart from the ksonnet lib.

* Reduce duplication in jsonnet.

Signed-off-by: default avatarTom Wilkie <tom.wilkie@gmail.com>

* Fix rebase

Signed-off-by: default avatarTom Wilkie <tom.wilkie@gmail.com>

* Tidy up promtail config imports.

Signed-off-by: default avatarTom Wilkie <tom.wilkie@gmail.com>
parent 56901f76
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment