feat(stt): recherche web (SearXNG in-cluster) + fix cluster_status (#49)

Phase 2 d'Asa agentique : nouvel outil web_search adossé à un SearXNG
self-host in-cluster, + correction du faux positif de cluster_status.

- SearXNG (k8s/apps/searxng/) : Deployment + Service + ConfigMap settings.yml
  + IngressRoute searxng.lab.local, Application ArgoCD. Namespace ai, interne
  (l'outil tape http://searxng:8080). use_default_settings + search.formats
  inclut json (sinon API JSON 403) ; limiter/image_proxy off ; image pinnée ;
  conf copiée dans un emptyDir via initContainer (contourne le mount RO) ;
  PodSecurity restricted.
- Outil web_search (tools._web_search) ajouté au contexte asa + STT_SEARXNG_URL.
- fix(cluster_status) : les pods de CronJob TERMINÉS (Succeeded/Failed, ex.
  sacrifice-assign-renfort) comptaient comme « non prêts » → fausse alarme.
  Join kube_pod_status_phase{phase=~"Running |Pending"} (3 faux positifs → 0,
  validé in-cluster).
- Serveur 0.8.0 ; doc stt.md + journal mis à jour.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ALI YESILKAYA 2026-06-22 22:10:59 +02:00 committed by GitHub
parent c9e89c91b9
commit 73b52cde2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 270 additions and 16 deletions

View file

@ -137,8 +137,13 @@ async def alerts_block(client: httpx.AsyncClient) -> str:
async def cluster_block(client: httpx.AsyncClient) -> str:
try:
nodes = await _prom_query(client, 'up{job=~"storage-01|gpu-01-node"}')
# « Non prêt » = ready false ET pod ENCORE actif (Running/Pending). Sans le filtre de
# phase, les pods de CronJob terminés (Succeeded/Failed — ex. sacrifice-assign-renfort)
# comptent comme « non prêts » → fausse alarme. Le join exclut les pods terminés.
not_ready = await _prom_query(
client, 'kube_pod_status_ready{condition="false"} == 1'
client,
'kube_pod_status_ready{condition="false"} == 1'
' and on(namespace,pod) kube_pod_status_phase{phase=~"Running|Pending"} == 1',
)
ready = await _prom_query(client, 'count(kube_pod_status_ready{condition="true"} == 1)')
except httpx.HTTPError: