From 9d2ed113c8c212665b3687787f9228eafe84aaab Mon Sep 17 00:00:00 2001 From: Pranshu Srivastava Date: Tue, 3 Mar 2026 18:23:00 +0530 Subject: [PATCH] fixup! fixup! fixup! discovery/kubernetes: Support linked pod controllers Signed-off-by: Pranshu Srivastava --- docs/configuration/configuration.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/docs/configuration/configuration.md b/docs/configuration/configuration.md index 87fd60bda5..6d9da2dd45 100644 --- a/docs/configuration/configuration.md +++ b/docs/configuration/configuration.md @@ -2284,9 +2284,9 @@ Available meta labels: * `__meta_kubernetes_pod_uid`: The UID of the pod object. * `__meta_kubernetes_pod_controller_kind`: Object kind of the pod controller. * `__meta_kubernetes_pod_controller_name`: Name of the pod controller. -* `__meta_kubernetes_pod_deployment_name`: Name of the deployment the pod belongs to. -* `__meta_kubernetes_pod_cronjob_name`: Name of the cronjob the pod belongs to. -* `__meta_kubernetes_pod_job_name`: Name of the job the pod belongs to. +* `__meta_kubernetes_pod_deployment_name`: Name of the deployment the pod belongs to. Requires `attach_metadata: {deployment: true}`. +* `__meta_kubernetes_pod_cronjob_name`: Name of the cronjob the pod belongs to. Requires `attach_metadata: {cronjob: true}`. +* `__meta_kubernetes_pod_job_name`: Name of the job the pod belongs to. Requires `attach_metadata: {job: true}`. #### `endpoints` @@ -2423,6 +2423,18 @@ attach_metadata: # Attaches namespace metadata to discovered targets. Valid for roles: pod, endpoints, endpointslice, service, ingress. # When set to true, Prometheus must have permissions to list/watch Namespaces. [ namespace: | default = false ] +# Attaches deployment metadata to discovered pod targets. Valid for role: pod. +# When set to true, Prometheus must have permissions to list/watch ReplicaSets. +# Enables the __meta_kubernetes_pod_deployment_name label. + [ deployment: | default = false ] +# Attaches job metadata to discovered pod targets. Valid for role: pod. +# When set to true, Prometheus must have permissions to list/watch Jobs. +# Enables the __meta_kubernetes_pod_job_name label. + [ job: | default = false ] +# Attaches cronjob metadata to discovered pod targets. Valid for role: pod. +# When set to true, Prometheus must have permissions to list/watch Jobs. +# Enables the __meta_kubernetes_pod_cronjob_name label. + [ cronjob: | default = false ] # HTTP client settings, including authentication methods (such as basic auth and # authorization), proxy configurations, TLS options, custom HTTP headers, etc.