Repository navigation
Description
Summary
Found in the release/v0.2.23 review (line numbers at 7fdaa9d).
-
Ingress routes are blocked by the stack's own network policies. Traefik runs in
kube-system(CONST_CLOUDFLARE_DEFAULT_SERVICE,src/devops_cli/config/constants.py:236), but neither policy admits it:k8s/llm/networkpolicy.yaml:9-31admits only same-namespace andmonitoringtraffic, and covers open-webui, ollama and qdrant.k8s/otel/networkpolicy.yaml:17-28admits onlymonitoring,ingressand same-namespace traffic.
On enforcing CNIs such as k3s, the
chat.,ollama.,qdrant.andjaeger.routes return 504. -
Every deploy applies an unrendered template. The root kustomization includes
ingress, which is an unrendered*.example.comtemplate, andcloudflared(k8s/kustomization.yaml:8-9).deploy-stackapplies it unrendered on every run (src/devops_cli/commands/k8s/stack_lifecycle.py:660-662), including automatically at container start throughDEVOPS_K8S_AUTO_DEPLOY=true(.devcontainer/devcontainer.json:44).- After
devops k8s apply k8s/ingress --template, the next deploy resets all Ingress hosts toexample.com. - Setups without Cloudflare get cloudflared pods stuck in
CreateContainerConfigError, because thecloudflared-tokensecret is required.
- After
-
The gateway cannot reach the volta Ollama deployment. The gateway's egress policy allows only pods labelled
ollama,vllm,vllm-single,lightllmorvalkey(k8s/llm/gateway/networkpolicy.yaml:25-61). The volta pods are labelledollama-volta-1, althoughk8s/llm/gateway/configmap.yaml:90-98routes devops-review traffic to them.tests/test_k8s_llm_gateway.py:583-612only checksvllm-single. -
Ollama hosts are missing from
NO_PROXY(unconfirmed that LiteLLM honours the proxy variables). The gateway'sNO_PROXYlacks*.ollama-nodes.llm.svc.cluster.localandollama-volta-1.llm.svc.cluster.local(k8s/llm/gateway/deployment.yaml:64-69). Calls to those hosts go through squid, which the llm perimeter blocks, so Ollama-backed models return 503/504. -
The cloudflared egress policy is both too broad and too narrow.
- The "to ingress controller" rule has no
to:, so ports 80/443/8000/8443 are open to any destination (k8s/cloudflared/networkpolicy.yaml:42-51). - Only UDP 7844 is allowed, which blocks the TCP 7844 fallback (
:38-41). - The ingress rule admits every stack namespace, not just monitoring (
:17-26).
- The "to ingress controller" rule has no
-
Squid lets pods bypass their egress policies. It forwards to cluster-internal destinations: plain HTTP to 80/443/1025-65535, and CONNECT to 443/8443/8080/11434 (
k8s/squid/configmap.yaml:75,:88-92; open egress atk8s/squid/networkpolicy.yaml:60-62). Pods whose policies allow only DNS and squid can still reach Prometheus, ArgoCD, the collector and the registry through it. This predates the release, but the new gateway comments rely on it being closed. -
The OTel collector accepts writes from the LAN. The collector Service moved from ClusterIP to NodePort (
k8s/otel/values.yaml:108-109), which exposes the unauthenticated OTLP write path on every node IP.
Remediation Plan
- Admit Traefik in the llm and otel policies: a
kube-systemnamespaceSelector withapp.kubernetes.io/name: traefik. - Move
ingressandcloudflaredout of the root kustomization into an opt-in overlay that onlydevops k8s apply --templaterenders. - Allow the gateway's egress to
ollama-volta-1, and extend the gateway test to cover every backend in the configmap. - Add the Ollama hosts to
NO_PROXY. - Restrict cloudflared egress to Traefik and allow TCP 7844. Narrow its ingress rule to monitoring.
- Deny cluster-internal destinations in squid.
- Return the collector to ClusterIP, or document why a NodePort is needed.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
fix: harden sandbox, pricing ledger, cloudflare public IP bypass, and…
dan-petty commentedon Sep 28, 2026
Closed by #676, merged into
release/v0.2.23.GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by
devops gh issues close-merged.