mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-10 16:04:04 +00:00
feat(multiplayer): package observability resources
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user