postfinance / kuota-calc

Simple utility to calculate the resource quota needed for your k8s deployment(s)
MIT License
24 stars 4 forks source link

Bug: wrong maxReplicas for rolling updates #20

Open druppelt opened 2 months ago

druppelt commented 2 months ago

The max replicas should be replicas+maxSurge. Instead kuota-calc uses replicas+maxSurge-maxUnavailable. For a mostly stock Deployment with 10 replicas this means that there will be max 13 replicas, but kuota calc outputs 11. This is both from my understanding of the kubernetes docs and a local test using the kubernetes install shipping with docker desktop.

druppelt commented 2 months ago

This is implemented in v0.3.3 of my fork. I'll keep the issue open until this is merged into this repo.