mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-21 02:04:09 +00:00
The three budgets are spent one after the other, so what has to fit inside the orchestrator's grace period is their sum - and nothing said what that sum was. Working it out meant reading a configuration file, remembering which fields were absent, and knowing what each one falls back to. Start-up now prints it: the three values and the total, taken from the resolved budget rather than from the file. A field left out still costs its default, so adding up what was written down understates the total by exactly the fields nobody wrote - which is the arithmetic somebody doing this by hand gets wrong. Whether the total fits is a separate question, and the framework cannot answer it alone: `docker stop` allows ten seconds and Kubernetes thirty, three times apart. A fixed threshold would have warned about the manifest this repository is about to ship. So extend.shutdown.grace is optional, nothing reads it during a shutdown, and when it is absent the line says so and prints both reference values instead of judging. When it is set and the budget does not fit, the warning names the shortfall: how many more seconds are needed. A minimum, not a target - this is somebody else's deployment under constraints this process cannot see, and asking them to leave headroom on top is not this line's business. Equal does not fit either; the grace period is when SIGKILL is sent, so a budget that ends exactly then leaves the last callback no time to return.