turbot/kubernetes_insights

Query: pods_for_cronjob

Usage

powerpipe query kubernetes_insights.query.pods_for_cronjob

SQL

select
pod.uid as uid
from
kubernetes_job as j,
jsonb_array_elements(j.owner_references) as j_owner,
kubernetes_pod as pod,
jsonb_array_elements(pod.owner_references) as pod_owner
where
j_owner ->> 'uid' = $1
and j.context_name = pod.context_name
and pod_owner ->> 'uid' = j.uid;