turbot/kubernetes_compliance

Query: namespace_resource_quota_cpu_limit

Usage

powerpipe query kubernetes_compliance.query.namespace_resource_quota_cpu_limit

SQL

select
distinct(coalesce(n.uid, concat(n.path, ':', n.start_line))) as resource,
case
when q.spec_hard -> 'limits.cpu' is null then 'alarm'
else 'ok'
end as status,
case
when q.spec_hard -> 'limits.cpu' is null then n.name || ' do not have ResourceQuota for CPU limit.'
else n.name || ' have ResourceQuota for CPU limit.'
end as reason
, coalesce(n.context_name, '') as context_name, n.name, n.source_type, coalesce(n.path || ':' || n.start_line || '-' || n.end_line, '') as path
from
kubernetes_namespace n
left join kubernetes_resource_quota q
on n.name = q.namespace;

Controls

The query is being used by the following controls: