Repository navigation
Closed
Labels
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/k8sKubernetes commands, Helm charts, pods, services, and policiestype/bugType bug: the code does not do what it must
Milestone
Description
Summary
Found in the release/v0.2.23 review (line numbers at 7fdaa9d).
- FQDN URL configuration can send provider API keys to an ingress host.
k8s configure-urlsin FQDN mode always overwritesai.gateway_url, forcesai.gateway_enabled=True, and rewritesai.tasks.chat/analysis.api_base_url, whichever provider those tasks use (src/devops_cli/commands/k8s/networking.py:654-661). The same happens viadeploy-stack --configure-urlsandport-forward --update-config.- The gateway host is found by matching "llm-gateway" as a substring of any Ingress backend in any namespace (
:555-603). The namespace-awareCONST_K8S_INGRESS_SERVICE_PATTERNSgoes unused. - With
ai.provider: claude/openai/copilot, chat and analysis requests go tohttps://ai.<domain>/v1carrying the provider's API key. tests/test_k8s_networking.py:238-266asserts the forcedgateway_enabled.
cloudflare tunnel syncdeletes existing tunnel settings. It PUTs a full replacement configuration (generated rules plus a 404) without reading the current one (src/devops_cli/cloudflare/client.py:353-381,:445-465;src/devops_cli/commands/cloudflare.py:456-467,:532-534). Other hostname routes,pathrules,originRequestsettings andwarp-routingare silently removed, and--dry-runlists only the new rules.- Tunnel lookup can pick a deleted tunnel (unconfirmed against the live API).
resolve_tunnel_idfilters by name only and takesresult[0], withoutis_deleted=false(client.py:320-338). A deleted-and-recreated tunnel can resolve to the dead one. cloudflare dns delete <name>deletes every record at that name. It removes records of all types, sodns delete @also removes apex MX, TXT and CAA records. There is no type filter, no check of the "Managed by devops-cli" comment, and no confirmation (commands/cloudflare.py:294-333).- DNS listing reads only one page. It fetches
per_page=100and never followsresult_info(client.py:237-255). Zones with more records truncatedns list, report real records as "not found" on delete, and makedns syncPOST duplicates and abort part-way. - An explicit
k8s.addressing: nodeportis overridden. It becomes FQDN wheneverk8s.domainis set (networking.py:726-737).tests/test_k8s_networking.py:200-219asserts the override. - The Valkey guard checks the wrong field. The new guard against localhost overwriting a remote endpoint checks
valkey.url, but then rewritesvalkey.hostandvalkey.port(networking.py:433-441).
Remediation Plan
- In FQDN mode, update only endpoints that are unset or local (
_should_update_url). Never forcegateway_enabled, and never rewrite taskapi_base_urlfor non-gateway providers. Discover the gateway throughCONST_K8S_INGRESS_SERVICE_PATTERNS, with namespace matching. - Read the current tunnel configuration, merge the generated rules into it, and preserve all other settings. Show additions and removals in
--dry-run. - Filter out deleted tunnels.
- Add a
--typefilter todns delete, and delete only records marked as managed unless forced. - Paginate DNS listing.
- Honour an explicit addressing mode.
- Guard on
hostandport. - Add tests for each item, and fix the two tests that assert the current behaviour.
Metadata
Metadata
Assignees
Labels
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/k8sKubernetes commands, Helm charts, pods, services, and policiestype/bugType bug: the code does not do what it must
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.