Compare commits

..

No commits in common. "master" and "feature/atlasbot" have entirely different histories.

6 changed files with 77 additions and 2540 deletions

9
Jenkinsfile vendored
View File

@ -14,7 +14,7 @@ spec:
kubernetes.io/arch: arm64 kubernetes.io/arch: arm64
node-role.kubernetes.io/worker: "true" node-role.kubernetes.io/worker: "true"
imagePullSecrets: imagePullSecrets:
- name: harbor-robot-pipeline - name: harbor-bstein-robot
containers: containers:
- name: dind - name: dind
image: docker:27-dind image: docker:27-dind
@ -49,7 +49,7 @@ spec:
- name: harbor-config - name: harbor-config
mountPath: /docker-config mountPath: /docker-config
- name: tester - name: tester
image: python:3.12-slim image: registry.bstein.dev/bstein/ariadne-ci:py312
command: ["cat"] command: ["cat"]
tty: true tty: true
volumeMounts: volumeMounts:
@ -61,11 +61,10 @@ spec:
- name: docker-config-writable - name: docker-config-writable
emptyDir: {} emptyDir: {}
- name: dind-storage - name: dind-storage
persistentVolumeClaim: emptyDir: {}
claimName: jenkins-dind-cache
- name: harbor-config - name: harbor-config
secret: secret:
secretName: harbor-robot-pipeline secretName: harbor-bstein-robot
items: items:
- key: .dockerconfigjson - key: .dockerconfigjson
path: config.json path: config.json

File diff suppressed because it is too large Load Diff

View File

@ -649,7 +649,6 @@ class FireflyService:
counters.failures += 1 counters.failures += 1
summary = counters.summary() summary = counters.summary()
summary_payload = summary.__dict__
logger.info( logger.info(
"firefly user sync finished", "firefly user sync finished",
extra={ extra={
@ -661,7 +660,7 @@ class FireflyService:
"failures": summary.failures, "failures": summary.failures,
}, },
) )
return {"status": counters.status(), "summary": summary_payload} return {"status": counters.status(), "summary": summary}
firefly = FireflyService() firefly = FireflyService()

View File

@ -606,7 +606,6 @@ class WgerService:
counters.failures += 1 counters.failures += 1
summary = counters.summary() summary = counters.summary()
summary_payload = summary.__dict__
logger.info( logger.info(
"wger user sync finished", "wger user sync finished",
extra={ extra={
@ -618,7 +617,7 @@ class WgerService:
"failures": summary.failures, "failures": summary.failures,
}, },
) )
return {"status": counters.status(), "summary": summary_payload} return {"status": counters.status(), "summary": summary}
wger = WgerService() wger = WgerService()

View File

@ -189,7 +189,6 @@ class Settings:
k8s_api_timeout_sec: float k8s_api_timeout_sec: float
vm_url: str vm_url: str
cluster_state_vm_timeout_sec: float cluster_state_vm_timeout_sec: float
alertmanager_url: str
mailu_sync_cron: str mailu_sync_cron: str
nextcloud_sync_cron: str nextcloud_sync_cron: str
@ -470,7 +469,6 @@ class Settings:
"http://victoria-metrics-single-server.monitoring.svc.cluster.local:8428", "http://victoria-metrics-single-server.monitoring.svc.cluster.local:8428",
).rstrip("/"), ).rstrip("/"),
"cluster_state_vm_timeout_sec": _env_float("ARIADNE_CLUSTER_STATE_VM_TIMEOUT_SEC", 5.0), "cluster_state_vm_timeout_sec": _env_float("ARIADNE_CLUSTER_STATE_VM_TIMEOUT_SEC", 5.0),
"alertmanager_url": _env("ARIADNE_ALERTMANAGER_URL", "").rstrip("/"),
"cluster_state_cron": _env("ARIADNE_SCHEDULE_CLUSTER_STATE", "*/15 * * * *"), "cluster_state_cron": _env("ARIADNE_SCHEDULE_CLUSTER_STATE", "*/15 * * * *"),
"cluster_state_keep": _env_int("ARIADNE_CLUSTER_STATE_KEEP", 168), "cluster_state_keep": _env_int("ARIADNE_CLUSTER_STATE_KEEP", 168),
} }

View File

@ -143,19 +143,6 @@ def test_collect_cluster_state(monkeypatch) -> None:
assert snapshot["metrics"]["pod_mem_top"] == [] assert snapshot["metrics"]["pod_mem_top"] == []
assert snapshot["metrics"]["job_failures_24h"] == [] assert snapshot["metrics"]["job_failures_24h"] == []
assert snapshot["metrics"]["pvc_usage_top"] == [] assert snapshot["metrics"]["pvc_usage_top"] == []
assert snapshot["summary"]["counts"]["nodes_total"] == 5.0
assert snapshot["summary"]["counts"]["nodes_ready"] == 5.0
assert snapshot["summary"]["counts"]["pods_running"] == 5.0
assert snapshot["summary"]["top"]["namespace_pods"][0]["namespace"] == "media"
assert snapshot["summary"]["baseline_window"]
assert "workload_not_ready" in snapshot["summary"]["top"]
assert "pod_restarts" in snapshot["summary"]["top"]
assert "attention_ranked" in snapshot["summary"]
assert snapshot["summary"]["health_bullets"]
assert snapshot["summary"]["unknowns"] == []
assert snapshot["context"]["nodes"]
assert snapshot["context"]["namespaces"]
assert "baseline" in snapshot["context"]["nodes"][0]
assert summary.nodes_total == 2 assert summary.nodes_total == 2
assert summary.nodes_ready == 1 assert summary.nodes_ready == 1
assert summary.pods_running == 5.0 assert summary.pods_running == 5.0