Open BlythMeister opened 1 year ago
As @BlythMeister pointed we already have https://github.com/stackrox/kube-linter/blob/6ba361ac592fbb27e520ff04610799bdbeb21624/pkg/templates/hpareplicas/template.go#L18 template but it's limited to check minimum. Maybe we should add a new template that will check if replicas is in range and reuse it in min replicas to keep backward compatibility.
As a use case, maximum is useful in a larger org to ensure someone doesn't go crazy on HPA and set like max 50 (don't ask me why...please don't ask me why!)
Description of the problem/feature request Add check for HPA maxReplicas which functions in the same way as minReplicas
Additional context We are migrating from datree and this was a check they have: https://hub.datree.io/built-in-rules/ensure-hpa-maximum-replicas