compliantkubernetes-apps icon indicating copy to clipboard operation
compliantkubernetes-apps copied to clipboard

[1] Add a gatekeeper constraint that warns application developers when they deploy with less then 3 replicas

Open lucianvlad opened this issue 11 months ago • 1 comments

Proposed feature

During a customer interview it was discovered that some customers are noticing downtime's during node reboots and kubespray upgrades and that is because they are not having 2 replicas on their deployments. It would be great if we have a gatekeeper constraint that will print out a warning message to the application developers every time they will deploy something that has less than 2 replicas.

Proposed alternatives

Create a gatekeeper constraint that will warn the application developer when they are deploying with less than 2 replicas and recommend to deploy using minimum of 2 replicas, preferably 3 replicas for redundancy and high availability purposes.

Additional context

This would work very well in combination with having default build-in cluster-wide PodTopologySpreadConstraints.

Definition of done

  • [ ] A gatekeeper constraint is created with the above details.

lucianvlad avatar Mar 01 '24 14:03 lucianvlad

I think that this could be rather annoying for some deployments where it is fine with just one or two replicas. So I suggest that there should be some exception that makes it possible to ignore this policy if the deployment has a special label set (or some similar solution).

viktor-f avatar Mar 04 '24 07:03 viktor-f