From 702a6e4f52c73dade622f63bc92221e937ccdb2c Mon Sep 17 00:00:00 2001 From: Andrew Stoltz Date: Thu, 23 Apr 2026 10:02:09 -0500 Subject: [PATCH] fix(agent-zero): use short DNS name to avoid CoreDNS template hijack MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The full FQDN fc-llm-bridge.fc-llm-bridge.svc.cluster.local has 4 dots, which is less than the pod's ndots:5 threshold. The resolver then applies every entry in the search list BEFORE falling through to the bare FQDN, and the CoreDNS 'template iamworkin.lan' catch-all matches "...svc.cluster.local.iamworkin.lan" and returns Traefik VIP 10.0.56.200. The egress NetworkPolicy blocks that VIP (0.0.0.0/0 EXCEPT 10.0.0.0/8), so curl hangs for 30-134s and returns HTTP 000. Reference: feedback_coredns_ndots_template_collision memory. Fix: use "fc-llm-bridge.fc-llm-bridge.svc" (2 dots, still <5 so search expansion still fires, but the first suffix "...svc.cluster.local" hits the Kubernetes plugin in CoreDNS and returns the real ClusterIP 10.43.67.125 before the iamworkin.lan template is ever consulted). Verified: pod-exec curl fc:cheap → HTTP 200 with a real chat.completion envelope (Ollama/gemma3:4b via bridge). Co-Authored-By: Claude Opus 4.7 (1M context) --- apps/agent-zero/agent-zero.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/agent-zero/agent-zero.yaml b/apps/agent-zero/agent-zero.yaml index 567e262..67b2ddf 100644 --- a/apps/agent-zero/agent-zero.yaml +++ b/apps/agent-zero/agent-zero.yaml @@ -260,7 +260,7 @@ spec: # proxy (workstation primary, edge1 fallback). mkdir -p /a0/usr/plugins/_model_config cat > /a0/usr/plugins/_model_config/config.json << 'MODELCFG' - {"allow_chat_override":true,"chat_model":{"provider":"openai","name":"fc:balanced","api_base":"http://fc-llm-bridge.fc-llm-bridge.svc.cluster.local:8080/v1","ctx_length":8192,"ctx_history":0.7,"vision":false,"kwargs":{"temperature":0,"num_ctx":8192}},"utility_model":{"provider":"ollama","name":"qwen2.5:1.5b","api_base":"http://127.0.0.1:11434","ctx_length":8192,"ctx_input":0.7,"kwargs":{"num_ctx":8192}},"embedding_model":{"provider":"ollama","name":"nomic-embed-text","api_base":"http://127.0.0.1:11434","kwargs":{}}} + {"allow_chat_override":true,"chat_model":{"provider":"openai","name":"fc:balanced","api_base":"http://fc-llm-bridge.fc-llm-bridge.svc:8080/v1","ctx_length":8192,"ctx_history":0.7,"vision":false,"kwargs":{"temperature":0,"num_ctx":8192}},"utility_model":{"provider":"ollama","name":"qwen2.5:1.5b","api_base":"http://127.0.0.1:11434","ctx_length":8192,"ctx_input":0.7,"kwargs":{"num_ctx":8192}},"embedding_model":{"provider":"ollama","name":"nomic-embed-text","api_base":"http://127.0.0.1:11434","kwargs":{}}} MODELCFG # Strip heredoc indentation sed -i 's/^ //' /a0/usr/plugins/_model_config/config.json @@ -282,7 +282,7 @@ spec: - name: A0_SET_chat_model_name value: "fc:balanced" - name: A0_SET_chat_model_api_base - value: "http://fc-llm-bridge.fc-llm-bridge.svc.cluster.local:8080/v1" + value: "http://fc-llm-bridge.fc-llm-bridge.svc:8080/v1" - name: A0_SET_chat_model_api_key valueFrom: secretKeyRef: