Closed ManuelGerding closed 4 months ago
Does someone have an opinion on this? I just want to ensure that filing a pull request eventually has a chance of success as it is aligned with Kube-score's community.
Hey @ManuelGerding, I 100% agree with this issue! A HPA with minReplicas: 1
should be treated the same as if the Deployment had replicas: 1
.
Which version of kube-score are you using?
kube-score version: v1.17.0
What did you do?
I validated the replicas of a deployment that is targeted by a service and an HPA. However, the
minReplicas
of the HPA is set to1
. This is, according to kubernetes.io docs, also the default value.What did you expect to see?
The
deployment-replicas
check (score/deployment/deployment.go#L54 ) should have warned me about a single replica. In my opinion, when having an HPA, a replica of 1 isn't considered reliable either.What did you see instead?
The
deployment-replicas
check (score/deployment/deployment.go#L54 ) didn't warn about single replica. Looking at the source code, it explicitly mentions marking deployments targeted by an HPA as good. However, what's missing is the part to check the HPA's configuration and the configuredminReplicas
to really ensure having at least two replicas.Happy to hear some more thoughts on this!