postfinance / kuota-calc

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

change max replica calc to only include initContainer for rolling out pods #17

Open druppelt opened 2 months ago

druppelt commented 2 months ago

Currently the calculation assumes that e.g. 3 replicas + 1 pod overhead for rolling rollout needs the resources for 4 initContainers. My understanding is, that for a given pod the init resources will never be needed simultaneous to the container resources. So for this example the normally running containers should not include the initContainer and the overhead over normal replicas should only be either the init container or the normal containers, whatever is bigger.

As it doesn't seem like this is beeing maintained I created my own fork, in which I plan to implement this. Should I be mistaken, please let me know and I'll create pull requests.

druppelt commented 2 months ago

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