Control: Azure Policy Add-on for Kubernetes service (AKS) should be installed and enabled on your clusters
Description
Azure Policy Add-on for Kubernetes service (AKS) extends Gatekeeper v3, an admission controller webhook for Open Policy Agent (OPA), to apply at-scale enforcements and safeguards on your clusters in a centralized, consistent manner.
Usage
Run the control in your terminal:
powerpipe control run azure_compliance.control.kubernetes_cluster_add_on_azure_policy_enabled
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run azure_compliance.control.kubernetes_cluster_add_on_azure_policy_enabled --share
SQL
This control uses a named query:
select kc.id as resource, case when addon_profiles -> 'azurepolicy' ->> 'enabled' = 'true' then 'ok' else 'alarm' end as status, case when addon_profiles -> 'azurepolicy' ->> 'enabled' = 'true' then name || ' add on azure policy enabled.' else name || ' add on azure policy disabled.' end as reason , kc.resource_group as resource_group , sub.display_name as subscriptionfrom azure_kubernetes_cluster kc, azure_subscription subwhere sub.subscription_id = kc.subscription_id;