Skip to content

docs(openspec): plan #2651 Add loki.url config key for k8s logs - #3151

Merged
dan-petty merged 3 commits into
mainfrom
fix/2651-devops-k8s-logs-names-a-loki
Nov 2, 2026
Merged

dan-petty merged 3 commits into
mainfrom
fix/2651-devops-k8s-logs-names-a-loki

Conversation

@devops-cli-service

@devops-cli-service devops-cli-service Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Plans #2651

Add the setting loki.url, so that devops config set loki.url works. One function picks the Loki address: --loki-url, else loki.url, else http://localhost:3100. The command, its --dry-run plan, the live log pane and the MCP tool k8s_logs all use it. The tool still takes no loki_url from a model. The address keeps the private egress level, and cloud metadata stays refused. The plan has two steps, each with tests that fail first. It also updates the spec k8s-logs and adds one requirement to configured-service-urls.

Change: openspec/changes/2651-devops-k8s-logs-names-a-loki/

🤖 Generated with Claude Code

https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW

@devops-cli-service
devops-cli-service Bot marked this pull request as ready for review November 2, 2026 05:00

Copy link
Copy Markdown
Owner

Review of the plan for #2651. CI is green and the premise holds (no loki setting exists; TempoConfig at settings.py:353 is the pattern to copy). Findings, most important first:

  1. Missed call site. DEFAULT_LOKI_URL is also used in k8s/cluster_plans.py:112 (plan_k8s_logs, the dry-run plan) and in logql.py:379 and :473. The plan only changes logql.py. Dry-run output would show localhost while the real query uses the setting. Add cluster_plans.py to the plan, with a test. The CLI wiring in commands/k8s/cluster_context.py (--loki-url at line 408) should be checked too.
  2. Egress and trust. The existing k8s-logs spec (lines 76 to 88) bars the MCP tool from taking a loki_url and applies SSRF rules to it. A stored loki.url makes the MCP tool dial a user-set address. State whether the egress checks apply to the setting, and add a scenario for a loopback or private value.
  3. Spec operation. Line 76 of openspec/specs/k8s-logs/spec.md defines "the default Loki". The new requirement changes that definition, so use MODIFIED for it and not only ADDED.
  4. Task details.
    • Task 1.2 imports DEFAULT_LOKI_URL "for the field description". qdrant and tempo do not, so drop it.
    • Task 2.1 puts a CLI-level test in tests/ai/mcp/test_k8s_logql.py. Name the real test file for each layer.
    • No task updates the config-key reference in README.md.
  5. Tracking line. Remove the "Workflow follow-up" section in tasks.md (rule 8).

Related open issues: #2651 (this plan's issue), #2469 (deploy-stack --dry-run lists requests; same dry-run plan family as finding 1).

Verdict: hold until findings 1 to 3 are fixed.


Generated by Claude Code

Copy link
Copy Markdown
Owner

Correction to my earlier review: finding 5 (remove the "Workflow follow-up" section) is wrong. openspec/config.yaml (tasks rules) says a change that alters code may end with the plain bullet "Pending a person: review the diff in tuicr (tuicr -r ..HEAD)." Keep it. My other findings stand.


Generated by Claude Code

Add the call sites that the first plan missed (the dry-run plan, the live log pane), the egress
level of a configured address, MODIFIED for the MCP requirement, the real test file of each layer,
the variable test, the generated documents, and the Feasibility evidence.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW
@dan-petty
dan-petty merged commit 947c6cb into main Nov 2, 2026
20 checks passed
@dan-petty
dan-petty deleted the fix/2651-devops-k8s-logs-names-a-loki branch November 2, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants