feat(multiplayer): package observability resources

This commit is contained in:
Josh Creek
2026-09-01 19:10:10 +01:00
parent 05e8a1b398
commit d04523accd
3 changed files with 16 additions and 1 deletions
@@ -14,12 +14,21 @@ DEFAULT_DIRECTORY = ROOT / "deploy" / "observability"
def verify(directory: Path, service_path: Path) -> None:
kustomization = (directory / "kustomization.yaml").read_text()
monitor = (directory / "prometheus-service-monitor.yaml").read_text()
rules = (directory / "prometheus-rules.yaml").read_text()
service = service_path.read_text()
allocator_monitor = (directory / "prometheus-allocator-service-monitor.yaml").read_text()
allocator_service = (ROOT / "deploy/k8s/base/allocator-service.yaml").read_text()
for resource in (
"prometheus-rules.yaml",
"prometheus-service-monitor.yaml",
"prometheus-allocator-service-monitor.yaml",
):
if resource not in kustomization:
raise ValueError(f"observability Kustomization omits {resource}")
if "kind: ServiceMonitor" not in monitor:
raise ValueError("ServiceMonitor resource is missing")
if "apiVersion: monitoring.coreos.com/v1" not in monitor: