Skip to content

Commit 3346c8c

Browse files
authored
Merge pull request #730 from pindge/feat/workload-job
2 parents fd91349 + 9630370 commit 3346c8c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

rules/apps.libsonnet

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,20 @@
200200
workload_type: 'statefulset',
201201
},
202202
},
203+
{
204+
record: 'namespace_workload_pod:kube_pod_owner:relabel',
205+
expr: |||
206+
max by (%(clusterLabel)s, namespace, workload, pod) (
207+
label_replace(
208+
kube_pod_owner{%(kubeStateMetricsSelector)s, owner_kind="Job"},
209+
"workload", "$1", "owner_name", "(.*)"
210+
)
211+
)
212+
||| % $._config,
213+
labels: {
214+
workload_type: 'job',
215+
},
216+
},
203217
],
204218
},
205219
],

0 commit comments

Comments
 (0)