From c04a3f083e88d6c546b61a91f17605dd83da8971 Mon Sep 17 00:00:00 2001 From: Lemon-miaow Date: Wed, 23 Sep 2026 04:05:22 +0800 Subject: [PATCH] =?UTF-8?q?fix(crd):=20persist=20status.emptySince=20?= =?UTF-8?q?=E2=80=94=20the=20field=20was=20pruned=20away=20by=20the=20sche?= =?UTF-8?q?ma?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- deploy/crd/felis.lolicon.best_minecraftservers.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/deploy/crd/felis.lolicon.best_minecraftservers.yaml b/deploy/crd/felis.lolicon.best_minecraftservers.yaml index f58883f..3a98e0d 100644 --- a/deploy/crd/felis.lolicon.best_minecraftservers.yaml +++ b/deploy/crd/felis.lolicon.best_minecraftservers.yaml @@ -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: