Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check "deployment-replicas" should consider minReplicas in HPA configuration #581

Closed
ManuelGerding opened this issue Jan 22, 2024 · 2 comments · Fixed by #588
Closed

Check "deployment-replicas" should consider minReplicas in HPA configuration #581

ManuelGerding opened this issue Jan 22, 2024 · 2 comments · Fixed by #588

Comments

@ManuelGerding
Copy link

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 to 1. 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 configured minReplicas to really ensure having at least two replicas.

Happy to hear some more thoughts on this!

@ManuelGerding
Copy link
Author

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.

@zegl
Copy link
Owner

zegl commented Feb 19, 2024

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.

ReuDa added a commit to steadybit/kube-score that referenced this issue Mar 5, 2024
@zegl zegl closed this as completed in #588 Mar 6, 2024
zegl pushed a commit that referenced this issue Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants