Control: Kubernetes clusters should have network policy enabled
Description
This control checks if network policy is enabled for Kubernetes cluster.
Usage
Run the control in your terminal:
powerpipe control run azure_compliance.control.kubernetes_cluster_network_policy_enabledSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run azure_compliance.control.kubernetes_cluster_network_policy_enabled --shareSQL
This control uses a named query:
select  c.id as resource,  case    when network_profile ->> 'networkPolicy' is not null then 'ok'    else 'alarm'  end as status,  case    when network_profile ->> 'networkPolicy' is not null then c.name || ' network policy enabled.'    else c.name || ' network policy disabled.'  end as reason    , c.resource_group as resource_group  , sub.display_name as subscriptionfrom  azure_kubernetes_cluster c  left join azure_subscription as sub on sub.subscription_id = c.subscription_id;