Repository navigation
Description
Problem
The runner pod cannot reach Qdrant. k8s/devops/networkpolicy.yaml admits egress only to DNS, the llm namespace on ports 4000 and 6379, the OTLP collector and public HTTPS. devops ai rag-query embeds the query through the gateway and then searches Qdrant, a separate service with its own URL and API key (qdrant.url, qdrant.api_key). The implement agent therefore cannot use the RAG index (#3563, item B).
Expected
The runner pod can reach the Qdrant search path and no other Qdrant path. It uses a read-only key that is scoped to search. The key is a cluster Secret that a person creates and pushes.
Acceptance criteria
- A test over
k8s/devops/networkpolicy.yaml: the runner pod has egress to Qdrant on its port, to nothing else new. - A test: the manifest adds no write or delete path for the runner.
- The change names the Secret that holds the read key and says that a person creates it (SECURITY.md); the change makes no Secret.
k8s/README.mdnames the new route.
Existing tool considered
Qdrant read-only API keys and the Kubernetes NetworkPolicy API cover the need. No new tool.
Related
Split from #3563. Related: #3041, item A (the loopback broker) of the same split.
Proposed design
Problem statement
The runner pod cannot reach Qdrant. The policy k8s/devops/networkpolicy.yaml admits egress to the llm namespace on ports 4000 and 6379 only, and Qdrant answers on 6333. So the implement agent cannot use the RAG index (#3563, item B). The change admits the Qdrant search path on TCP 6333 with a read-only key. It adds no write or delete path, and a person pushes the key.
Acceptance criteria
Requirement: Egress to Qdrant on TCP 6333
The devops perimeter MUST admit egress from the pods of namespace devops to namespace llm on TCP 6333.
Scenario: The policy admits the Qdrant port
- WHEN A test reads
k8s/devops/networkpolicy.yaml. - THEN It finds one egress rule whose peer is the namespace selector of
llmand whose only port is TCP 6333.
Requirement: No other new egress
The change MUST add no egress peer, port or protocol to the devops perimeter other than TCP 6333 to namespace llm.
Scenario: The admitted set stays the same
- WHEN A test reads the policy and collects each peer and each port of every egress rule.
- THEN The set equals DNS on 53, namespace
llmon 4000, 6379 and 6333, namespaceotelon 4318, and public HTTPS on 443.
Requirement: Qdrant admits the devops namespace
The policy that selects the Qdrant pod MUST admit ingress from namespace devops on TCP 6333.
Scenario: The Qdrant pod admits the runner
- WHEN A test reads the policy that selects the Qdrant pod.
- THEN It finds an ingress rule whose peer is namespace
devopsand whose port is TCP 6333.
Requirement: Qdrant reads a read-only key
The Qdrant container MUST read its read-only key from key read-only-api-key of Secret llm/qdrant-api-key.
Scenario: The read-only key comes from the Secret
- WHEN A test reads
llm/values-qdrant.yaml. - THEN The environment sets
QDRANT__SERVICE__READ_ONLY_API_KEYfrom asecretKeyRefto that key, and it holds no literal value.
Requirement: One keyring value feeds both Secrets
The push MUST write one keyring value, qdrant_read_only_api_key, to key read-only-api-key of Secret llm/qdrant-api-key and to DEVOPS_CLI_QDRANT_API_KEY of Secret devops/devops-cli.
Scenario: The table holds two rows from one keyring value
- WHEN A test reads the rows of
src/devops_cli/k8s/cluster_secrets.py. - THEN The row of
llm/qdrant-api-keykeyread-only-api-keyand the row ofdevops/devops-clikeyDEVOPS_CLI_QDRANT_API_KEYboth name keyringqdrant_read_only_api_key.
Requirement: The pod config names the Qdrant Service
The example ConfigMap MUST name qdrant.url as the Qdrant Service of namespace llm on TCP 6333, and it MUST hold no key value.
Scenario: The template names the in-cluster URL
- WHEN A test reads
k8s/devops/configmap.example.yaml. - THEN
qdrant.urlishttp://qdrant.llm.svc.cluster.local:6333, and theqdrantsection holds noapi_keyvalue.
Requirement: The runner holds no write path
The runner pod MUST get its Qdrant key from the read-only key, and no row of Secret devops/devops-cli MUST name the admin key api-key.
Scenario: The runner template reads the read-only key
- WHEN A test reads
k8s/devops/cronjob-runner.yamland the rows of Secretdevops/devops-cli. - THEN
DEVOPS_CLI_QDRANT_API_KEYcomes from keyringqdrant_read_only_api_key, and no row ofdevops/devops-clinames keyringqdrant_api_key.
Requirement: The README names the new route
k8s/README.md MUST name the Qdrant route of the devops namespace on TCP 6333.
Scenario: The README lists the route
- WHEN A test reads the section of
k8s/README.mdon devops-cli in the cluster. - THEN It names Qdrant on TCP 6333 beside the gateway, the cache and the collector.
Requirement: The documentation names the key and the person step
The documentation MUST name the read-only key and the command that a person runs to push it.
Scenario: The Cluster Secrets table holds the rows
- WHEN A test reads the Cluster Secrets section of
k8s/README.mdand rule 1 ofSECURITY.md. - THEN The section lists key
read-only-api-keyofllm/qdrant-api-keyandDEVOPS_CLI_QDRANT_API_KEYofdevops/devops-clifrom keyringqdrant_read_only_api_key, withdevops k8s push-secretsas the person step, and rule 1 names the read-only Qdrant key of the runner.
Existing Tool Considered
No alternatives check has run. The change builds no code, so there is no build cost. The Kubernetes NetworkPolicy API and the Qdrant read-only API key cover the need. The read-only key lacks a per-collection scope: it permits every read of the instance. A JWT RBAC token scopes to a collection, and it adds the setting jwt_rbac and a token that a person mints.
Key questions
- Which pod does
devops-default-perimeterselect, and does the runner pod carry its label?: The policy selects every pod of namespacedevopswhoseapp.kubernetes.io/nameis notcrawl4ai. The admission policy gives each runner Job the pod labelapp.kubernetes.io/name: devops-cli-job, so the policy selects it. [sources: k8s/devops/networkpolicy.yaml, k8s/devops/roadmap-service/admissionpolicy.yaml] - Does Qdrant need a key on the search path?: Yes. Qdrant requires the key of
llm/qdrant-api-keyon every REST and gRPC request. Only/,/healthz,/readyz,/livezand the files of its web UI need no key. [sources: k8s/README.md] - Which key does the runner pod use for Qdrant?: The read-only key of Qdrant. Secret
llm/qdrant-api-keygains keyread-only-api-key, and the Qdrant container reads it asQDRANT__SERVICE__READ_ONLY_API_KEY. The same keyring value,qdrant_read_only_api_key, feedsDEVOPS_CLI_QDRANT_API_KEYof Secretdevops/devops-cli. (best practice) [sources: SECURITY.md, k8s/README.md, k8s/devops/roadmap-service/admissionpolicy.yaml]- Chosen: One keyring value in both Secrets, as the read-only key. It permits search and read, and it refuses write and delete. One keyring value feeds both Secrets, as
crawl4ai_api_tokendoes, so the two values cannot differ. - Rejected: A JWT RBAC token scoped to one collection. It needs the setting
jwt_rbacand a token that a person mints. A collection name in the token breaks when the RAG collections change. - Rejected: The admin key
api-key. It grants write and delete, so the runner would hold the path that the issue forbids. - Rejected: A new Secret
devops/qdrant-read-only-key. The admission policy admits only Secretdevops-cliinenvFrom. A new Secret needs a policy change and a second inventory row for one value.
- Chosen: One keyring value in both Secrets, as the read-only key. It permits search and read, and it refuses write and delete. One keyring value feeds both Secrets, as
- How does the policy write the new egress rule?: As a separate egress rule. Its peer is the namespace selector of
llm, and its only port is TCP 6333. It carries a comment that names Qdrant and the search path. (best practice) [sources: k8s/devops/networkpolicy.yaml, k8s/README.md]- Chosen: A separate rule with a comment. It keeps the comment of the gateway rule true, and the review of the policy shows why 6333 exists.
- Rejected: Port 6333 in the port list of the gateway rule. The comment of that rule names the gateway and the cache only, so the rule would then state what it does not do.
- Rejected: A peer that selects the Qdrant pod by label, with
ports. The comment of the policy records that kube-router refused a namespace and pod selector peer paired withports:. - Rejected: An
ipBlockfor the Qdrant address. A pod address changes, and kube-router matches an ingressipBlockagainst pod addresses.
- Which policy admits the devops namespace to the Qdrant pod?: The policy that selects the Qdrant pod,
llm-default-perimeter, gains an ingress rule for namespacedevopson TCP 6333. It admits no other new peer. (best practice) [sources: k8s/devops/networkpolicy.yaml, k8s/README.md]- Chosen: An ingress rule in
llm-default-perimeter. It already selects the Qdrant pod. The devops policy assumes that each target inllmadmits only the pods that it serves. - Rejected: A dedicated Qdrant policy. A second policy is additive: the pod still takes
llm-default-perimeter, so two files would hold the peer list. - Rejected: Keep the ingress as it is. No source shows that the current ingress admits namespace
devopson 6333. A refused ingress leaves the new egress rule with no effect.
- Chosen: An ingress rule in
- Which URL does the in-cluster config use for Qdrant?:
http://qdrant.llm.svc.cluster.local:6333, the ClusterIP Service of namespacellm. (best practice) [sources: k8s/README.md, k8s/devops/configmap.example.yaml]- Chosen: The Service name of namespace
llm. It stays in the cluster, and the policy admits namespacellmon TCP 6333. It matches the shape of the gateway URL. - Rejected: The Ingress host
https://qdrant.<domain>. It leaves the cluster through Cloudflare Access and needs a public host. A pod holds no Access token. - Rejected: A port-forward to loopback. No person runs in a pod, and the policy admits no loopback peer.
- Chosen: The Service name of namespace
- Which file records the read-only key and the person step?: The Cluster Secrets table of
k8s/README.mdholds the rows. Rule 1 ofSECURITY.mdgains one sentence: the runner pod reads Qdrant with a read-only key from Secretdevops/devops-cli. (best practice) [sources: k8s/README.md, SECURITY.md, src/devops_cli/k8s/cluster_secrets.py]- Chosen: The rows in
k8s/README.md, and one sentence in rule 1 ofSECURITY.md. One table lists every Secret that a manifest references, and a test fails on a reference without a row. The sentence gives the runner its rule. - Rejected: A full list of the key in
SECURITY.md. It repeats the table, and no test reads it. The two lists would drift. - Rejected: The table only. The issue asks that the security policy names the read key of the runner.
- Chosen: The rows in
- Does the new route also serve the roadmap Service pod?: Yes.
devops-default-perimeterselects every pod of namespacedevops, so the Service pod also gets TCP 6333 tollm. It holds the same read-only key throughenvFrom, so the change adds no write path. (best practice) [sources: k8s/devops/networkpolicy.yaml, k8s/devops/roadmap-service/deployment.yaml, k8s/README.md]- Chosen: One rule for the namespace. It adds one rule. The Service pod reads the same read-only key from Secret
devops-clithroughenvFrom. - Rejected: A rule that selects only the runner label. kube-router refused a namespace and pod selector peer paired with
ports:, and a second policy would repeat the peer list.
- Chosen: One rule for the namespace. It adds one rule. The Service pod reads the same read-only key from Secret
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Alternatives check of 2026-11-08: in-use.
The item already names this tool.
Tool: qdrant/qdrant (https://github.com/qdrant/qdrant), Apache-2.0, last activity 2026-11-08, maintained.
Activity
dan-petty commentedon Nov 6, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(k8s)scope of the title gives the scope.It unblocks the implement agent RAG path but is not a production outage or security incident.It lets the implement agent use the RAG index, which improves agent output quality.The change is a network policy rule, a Secret reference, and two small tests.Both enable Qdrant access for a cluster workload, but #3589 is the indexer lane and the candidate is the runner pod.devops-cli-service commentedon Nov 7, 2026
Status set to Ready at eb7a1a4 (see proposed design in issue body).
devops-cli-service commentedon Nov 8, 2026
Alternatives check: in-use
Reason: The searches surfaced no dedicated open tool for Qdrant egress; they confirm Qdrant itself is an open, maintained project (Apache-2.0, actively pushed, not archived). Qdrant's read-only API key covers the "read-only key" part of the need (read/search only, no write or delete), but it supplies neither the cluster egress rule nor a per-collection scope, so one tool covers only part of what the issue asks for.
The item already names this tool.
Tool: qdrant/qdrant (https://github.com/qdrant/qdrant)
Covers:
Lacks:
Tools considered:
Searches run:
Sources:
Checked on 2026-11-08. A person decides what this means for the item. The check changes no label and closes no issue.
test(k8s): check the keyring values without a presence assert (#3823)
devops-cli-service commentedon Nov 14, 2026
Released in v0.143.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.143.0
devops-cli-service commentedon Nov 14, 2026
Live since 2026-11-14 21:08 UTC