fix(crd): persist status.emptySince — the field was pruned away by the schema

The operator stamps EmptySince to time the idle auto-stop window, but the CRD's
status schema never declared it. Kubernetes pruned the field on every write
(apiserver warning: unknown field "status.emptySince"), so the timer reset to
nil on every read and idle auto-stop could never fire — a defect invisible to
the fake-client unit tests, which do not enforce the CRD schema. Found live:
the stamp was silently dropped the moment it was set.

Schema now declares emptySince (date-time) like its sibling timestamps.
This commit is contained in:
Lemon-miaow committed 2026-09-23 04:05:22 +08:00
1 parent 72f0b4a258
commit c04a3f083e
1 file changed
+8
@@ -347,6 +347,14 @@ spec:
- type
type: object
type: array
emptySince:
description: |-
EmptySince is when the operator first observed 0 online players during
a Running phase (spec §8 idle auto-stop). It is reset when a player joins
or the server stops, so the empty-duration counter starts fresh each time
the server becomes unoccupied.
format: date-time
type: string
endpoint:
description: Endpoint is where the proxy should route traffic.
properties: