From 7aa56dcb1e8ee9b15b1408c8e085120eea6f4aa1 Mon Sep 17 00:00:00 2001 From: Will Anderson Date: Mon, 4 May 2026 16:15:38 -0500 Subject: [PATCH] fix(neuron-prod): add allow-dharma-ingress NetworkPolicy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The neuron-prod namespace runs a default-deny-all NetworkPolicy and explicit allow-ingress policies for every legitimate service: allow-mcp-ingress, allow-rest-ingress, allow-marketing-ingress, allow-daemon-ingress, allow-engram-ingress. There was no equivalent for dharma — so every request that arrived at Traefik in kube-system got 502'd at the Service-to-pod hop, even though the dharma pod itself was healthy and the IngressRoute was correctly defined. The previous attempt to fix the 502 (PR #1) removed an unrelated nonexistent certResolver from the IngressRoute. That was real but not sufficient — the Traefik routing layer was healthy after that change, but the Service-to-pod NetworkPolicy hop was still denied. This adds allow-dharma-ingress mirroring allow-mcp-ingress: accepts traffic from kube-system (Traefik) and from the neuron-prod namespace itself. --- .../prod/network-policy.yaml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/servers/legion/k8s/neuron-technologies/prod/network-policy.yaml b/servers/legion/k8s/neuron-technologies/prod/network-policy.yaml index 3352c1f..50af280 100644 --- a/servers/legion/k8s/neuron-technologies/prod/network-policy.yaml +++ b/servers/legion/k8s/neuron-technologies/prod/network-policy.yaml @@ -117,6 +117,32 @@ spec: matchLabels: kubernetes.io/metadata.name: neuron-prod --- +# ── dharma: accept from Traefik (kube-system) and neuron-prod namespace ────── +# The dharma pod was healthy and the IngressRoute was correct, but cross- +# namespace ingress from kube-system (Traefik) was denied by default-deny-all, +# so every external request landed at Traefik and bounced back as 502. This +# allow rule mirrors `allow-mcp-ingress` and brings dharma into line with the +# other neuron-prod services. +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: allow-dharma-ingress + namespace: neuron-prod +spec: + podSelector: + matchLabels: + app: dharma + policyTypes: + - Ingress + ingress: + - from: + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: kube-system + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: neuron-prod +--- # ── Egress: all prod pods may reach platform (postgres/redis), vault, # monitoring (alloy OTLP), kube-dns, and the internet (external APIs) ─ apiVersion: networking.k8s.io/v1