Closed joshiste closed 9 months ago
I think that this makes sense.
We should have a warning for: Deployments, that are not targeted by a HorizontalPodAutoscaler, that are targeted by Services, where replicas is unset or explicitly set to 1.
I don't think that the same can be said for StatefulSets. StatefulSets are usually trickier to scale, and the warning would in many cases not be actionable. Which would just lead to the warning being ignored.
PRs are very welcome :)
There is no check for the configured number of replicas.
From a resilience perspective, it would be reasonable to add a warning for statefulsets/deployments targeted by a service, and have the replica unset or = 1 and not have a horizontal pod autoscaler. For the same reason, if they have a horizontal pod auto scaler, it should be checked for minReplicas = 1.
KubeLinter has both of these checks. Let me know what you think. If you find this acceptable, I'd happily contribute a PR.