turbot/kubernetes_insights

Query: ingresses_for_service

Usage

powerpipe query kubernetes_insights.query.ingresses_for_service

SQL

select
i.uid
from
kubernetes_service as s,
kubernetes_ingress as i,
jsonb_array_elements(rules) as r,
jsonb_array_elements(r -> 'http' -> 'paths') as p
where
s.name = p -> 'backend' -> 'service' ->> 'name'
and s.context_name = i.context_name
and s.uid = $1;