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:Tom 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:
Tom Wilkie <tom.wilkie@gmail.com> * Fix rebase Signed-off-by:
Tom Wilkie <tom.wilkie@gmail.com> * Tidy up promtail config imports. Signed-off-by:
Tom Wilkie <tom.wilkie@gmail.com>
Showing
- production/helm/templates/promtail/configmap.yaml 119 additions, 7 deletionsproduction/helm/templates/promtail/configmap.yaml
- production/ksonnet/promtail/config.libsonnet 23 additions, 0 deletionsproduction/ksonnet/promtail/config.libsonnet
- production/ksonnet/promtail/promtail.libsonnet 4 additions, 167 deletionsproduction/ksonnet/promtail/promtail.libsonnet
- production/ksonnet/promtail/scrape_config.libsonnet 165 additions, 0 deletionsproduction/ksonnet/promtail/scrape_config.libsonnet
- tools/promtail.sh 121 additions, 7 deletionstools/promtail.sh
- tools/scrape_config.sh 50 additions, 0 deletionstools/scrape_config.sh
Loading
Please register or sign in to comment