mirror of
https://github.com/Alkatrazz24/Funk-lab.git
synced 2026-07-12 21:14:42 +02:00
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:
parent
c9e89c91b9
commit
73b52cde2c
14 changed files with 270 additions and 16 deletions
82
k8s/apps/searxng/deployment.yaml
Normal file
82
k8s/apps/searxng/deployment.yaml
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: searxng
|
||||
namespace: ai
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: searxng
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: searxng
|
||||
annotations:
|
||||
# Redéploie le pod quand settings.yml change (le hash bouge → nouveau rollout).
|
||||
checksum/config: "searxng-settings-v1"
|
||||
spec:
|
||||
# Conformité PodSecurity "restricted" (namespace ai). L'image tourne en uid 977 (searxng).
|
||||
# fsGroup 977 → l'emptyDir /etc/searxng est accessible en écriture par l'init + le main.
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 977
|
||||
runAsGroup: 977
|
||||
fsGroup: 977
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
# Copie settings.yml (ConfigMap RO) dans un emptyDir inscriptible → évite les soucis
|
||||
# de mount RO de l'entrypoint searxng (chown/sed éventuels sur le fichier de conf).
|
||||
initContainers:
|
||||
- name: copy-config
|
||||
image: docker.io/searxng/searxng:2026.6.22-952896d29
|
||||
command: ["sh", "-c", "cp /config-src/settings.yml /etc/searxng/settings.yml"]
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop: ["ALL"]
|
||||
volumeMounts:
|
||||
- name: config-src
|
||||
mountPath: /config-src
|
||||
readOnly: true
|
||||
- name: config
|
||||
mountPath: /etc/searxng
|
||||
containers:
|
||||
- name: searxng
|
||||
image: docker.io/searxng/searxng:2026.6.22-952896d29
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop: ["ALL"]
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
env:
|
||||
# Base URL interne (pas d'exposition WAN). Requis par SearXNG pour générer ses liens.
|
||||
- name: SEARXNG_BASE_URL
|
||||
value: "http://searxng.lab.local/"
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /etc/searxng
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: 8080
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 8080
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 20
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 192Mi
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 512Mi
|
||||
volumes:
|
||||
- name: config-src
|
||||
configMap:
|
||||
name: searxng-settings
|
||||
- name: config
|
||||
emptyDir: {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue