turbot/kubernetes_insights

Query: kubernetes_cluster_verbs

Usage

powerpipe query kubernetes_insights.query.kubernetes_cluster_verbs

SQL

select
distinct verb as label,
verb as value,
verb
from
kubernetes_role,
jsonb_array_elements(rules) as r,
jsonb_array_elements_text(r->'verbs') as verb
where
context_name in (select unnest (string_to_array($1, ',')::text[]))
union
select
distinct verb as label,
verb as value,
verb
from
kubernetes_cluster_role,
jsonb_array_elements(rules) as r,
jsonb_array_elements_text(r->'verbs') as verb
where
context_name in (select unnest (string_to_array($1, ',')::text[]))
order by
verb;

Params

ArgsNameDefaultDescriptionVariable
$1cluster_context