turbot/kubernetes_compliance

Query: service_no_tiller_service

Usage

powerpipe query kubernetes_compliance.query.service_no_tiller_service

Steampipe Tables

SQL

with tiller_service as (
select
distinct uid
from
kubernetes_service
where
(select 'tiller' ilike any (select jsonb_object_keys(tags)::text))
or (select 'tiller' ilike any (select jsonb_object_keys(selector)::text))
)
select
coalesce(s.uid, concat(s.path, ':', s.start_line)) as resource,
case
when t.uid is not null then 'alarm'
else 'ok'
end as status,
case
when t.uid is not null then name || ' using tiller service.'
else name || ' not using tiller service.'
end as reason
, coalesce(context_name, '') as context_name, namespace, source_type, coalesce(path || ':' || start_line || '-' || end_line, '') as path
from
kubernetes_service as s
left join tiller_service as t on t.uid = s.uid;

Controls

The query is being used by the following controls: