core: drop two manifest fields that were never wired up
`SystemdSpec.readiness` (ReadinessHttpGet) and `SystemdSpec.requires` were parsed and validated but read nowhere — no generator, CLI or API touched either. Both looked load-bearing and were not: - readiness duplicated `expose.http.health_path`, which wildpc-api already polls. wild-life-api.yaml declared both spellings of the same /health probe; only one did anything. - requires would mean systemd `Requires=`, a lifecycle binding (stop postgres, stop every dependent). `manage.systemd.after` already gives the ordering callers actually want, and a deployment's own `requires:` is the relationship model, not systemd wiring. Unknown keys parse as ignored, so existing deployment YAML keeps loading.
This commit is contained in:
@@ -142,19 +142,16 @@ LaunchSpec = Annotated[
|
||||
# ---------------------
|
||||
|
||||
|
||||
class ReadinessHttpGet(BaseModel):
|
||||
http_get: str
|
||||
timeout_seconds: int = 2
|
||||
interval_seconds: int = 2
|
||||
success_codes: list[int] = Field(default_factory=lambda: [200])
|
||||
|
||||
|
||||
class SystemdSpec(BaseModel):
|
||||
enable: bool = True
|
||||
user: bool = True
|
||||
description: str | None = None
|
||||
# Unit ordering (systemd ``After=``). There is deliberately no ``requires:``
|
||||
# partner emitting ``Requires=``: that binds lifecycles, so stopping postgres
|
||||
# would stop everything downstream, and ordering is what callers actually
|
||||
# want. A deployment's own ``requires:`` list is the relationship model (see
|
||||
# docs/relationships.md), not systemd wiring.
|
||||
after: list[str] = Field(default_factory=list)
|
||||
requires: list[str] = Field(default_factory=list)
|
||||
wanted_by: list[str] = Field(default_factory=lambda: ["default.target"])
|
||||
restart: RestartPolicy = RestartPolicy.ON_FAILURE
|
||||
restart_sec: int = 2
|
||||
@@ -172,7 +169,6 @@ class SystemdSpec(BaseModel):
|
||||
start_limit_burst: int = 10
|
||||
start_limit_interval_sec: int = 3600
|
||||
no_new_privileges: bool = True
|
||||
readiness: ReadinessHttpGet | None = None
|
||||
exec_reload: str | None = None
|
||||
# Commands run after the main process starts (systemd ``ExecStartPost=``), one
|
||||
# line each — e.g. an OpenBao auto-unseal step. Failures don't fail the unit.
|
||||
|
||||
Reference in New Issue
Block a user