diff --git a/k8s/apps/searxng/deployment.yaml b/k8s/apps/searxng/deployment.yaml index 43d0e50..3668c68 100644 --- a/k8s/apps/searxng/deployment.yaml +++ b/k8s/apps/searxng/deployment.yaml @@ -16,6 +16,11 @@ spec: # Redéploie le pod quand settings.yml change (le hash bouge → nouveau rollout). checksum/config: "searxng-settings-v1" spec: + # CRITIQUE : le Service s'appelle « searxng » → sans ça, k8s injecte la variable + # SEARXNG_PORT=tcp://:8080 (env « service link » façon Docker), que l'entrypoint + # SearXNG lit comme PORT de bind → granian crash (« 'tcp://…:8080' is not a valid integer »). + # On coupe l'injection des service-links (inutiles ici) ; on fixe aussi le port en dur ci-dessous. + enableServiceLinks: false # 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: @@ -51,6 +56,12 @@ spec: ports: - containerPort: 8080 env: + # Port/bind explicites (défense en profondeur vs l'env service-link, déjà coupé + # par enableServiceLinks:false) — l'entrypoint SearXNG lit ces variables. + - name: SEARXNG_PORT + value: "8080" + - name: SEARXNG_BIND_ADDRESS + value: "0.0.0.0" # 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/"