Control: Deployment should have a minimum of 3 replicas
Description
Replicas in the deployment should be at least 3 to increase the fault tolerance of the deployment.
Usage
Run the control in your terminal:
powerpipe control run kubernetes_compliance.control.deployment_replica_minimum_3Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run kubernetes_compliance.control.deployment_replica_minimum_3 --shareSQL
This control uses a named query:
select  coalesce(uid, concat(path, ':', start_line)) as resource,  case    when replicas < 3 then 'alarm'    else 'ok'  end as status,  name || ' has ' || replicas || ' replica.' as reason,  name as deployment_name    , coalesce(context_name, '') as context_name, namespace, source_type, coalesce(path || ':' || start_line || '-' || end_line, '') as pathfrom  kubernetes_deployment;