Commit b66403f
Add /system/standby API for out-of-band scale-to-zero pin
Adds two new endpoints to the kernel-images server:
- POST /system/standby/disable — pins scale-to-zero off until released
- POST /system/standby/enable — releases the pin
The pin lives alongside the existing request-driven middleware refcount in
DebouncedController: scale-to-zero stays disabled while either holders are
inflight requests OR the pin is held. Request-driven Enable calls do not
release the pin, so a pinned VM survives idle periods. Releasing the pin
honors any configured re-enable cooldown.
This is the in-VM surface for future control-plane integrations (e.g. a
hot-pool controller reserving a VM until it is claimed). Control-plane
wiring will follow in metro-api and the API server.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 43ddda6 commit b66403f
6 files changed
Lines changed: 785 additions & 193 deletions
File tree
- server
- cmd/api/api
- lib
- oapi
- scaletozero
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
0 commit comments