Repository navigation
Description
Problem or Motivation
The brain index (#4676) blocks #4671, #4682, #4687 and #6599. It waits for #4563, which also moves the GitHub request budget, the GraphQL hold, the halt and the delivery ids to Valkey (effort high), and whose design names #5497, an item under the hold #6521. The index needs only three parts of #4563: the valkey-roadmap instance, the setting of its URL and its ACL users. No valkey-roadmap instance exists in the cluster (measured on 2026-11-26).
Owner decision, 2026-11-26: split these three parts out of #4563 into this item, and make #4676 depend on this item. The split touches no stage or implement code, so the hold #6521 stays as it is.
Proposed Solution & Architectural Design
- The instance. A Kustomize folder in
k8s/devopsbuildsvalkey-roadmapfrom the shared Valkey base of dan-petty/infra (k8s/bases/valkey) at a release tag, with the componentsvalkey-acl,valkey-exporterandvalkey-persistence. ADR 0032 gives the home: the instance has one consumer, the roadmap Service and its jobs, so its folder lives with that consumer, and the shared base stays in infra. The values come from ADR 0021 section 3: AOF withappendfsync everysec,noeviction, a 2Gilocal-pathvolume, and ingress from namespacedevopsonly on TCP 6379, with the exporter port for namespacemonitoring. The pod gets no egress. - The ACL users. The default user is off from the first start, because the instance has no old client. The users are
brain(reads and writesroadmap:v1:brain-*, feat(roadmap): keep alternatives results in a brain index #4676),agent(readsroadmap:v1:brain-*and writes no key) andmetricsfor the exporter. The usersrouterandsweepof ADR 0021 come with the item that adds their first key (feat(service): share the GitHub budget and holds in Valkey #4563): a user with no key to reach gives no value and a pattern that nobody checked. The passwords are generated managed credentials insrc/devops_cli/k8s/cluster_secrets.py, and the aclfile is a derived entry, in the form of thevalkey-devopsrows of feat(k8s): give valkey-devops one ACL user for each role #4704. - The setting and the client. A setting names the URL of the instance (for example
roadmap.state.url), with its user and its password variable. One accessor gives a client of the instance on the existingValkeyClient, apart from the cache tier ofvalkey-devops. A reader of the brain index fails soft: when the instance does not answer, the reader gets a miss (ADR 0023 section 2). The fail-closed rule of the coordination keys stays in feat(service): share the GitHub budget and holds in Valkey #4563.
Rules from the findings of 2026-11-26 (comment on #6600):
- Each process sends one user. The key patterns of that user hold each key family that its process reads or writes. State the user of each process (the Service pod, the stage, implement and fix-checks containers, the MCP server) in the design.
- The user
metricsholds each command that the exporter sends at a scrape, or the exporter setting turns the command off (client|setname,latency|latest,latency|histogram). - A Job container gets the password of its user only if it already holds the private key of the App (fix(k8s): load only the needed Secret keys in runner Jobs #6518, fix(k8s): give the runner Jobs the credentials of the cache Valkey #7293).
Step of a person before the merge: run uv run devops k8s push-secrets from the branch, then --plan. Merge only when each key of the new object reads unchanged. The pod cannot start while the key of the aclfile is missing.
Not in this item: the request windows, the GraphQL hold, the halt, the delivery ids, the sentinel and the removal of the budget file. They stay in #4563, which then depends on this item.
Target Subsystem
Workstation Caching & Valkey (k8s/devops, src/devops_cli/k8s/cluster_secrets.py, src/devops_cli/valkey/, the settings).
Existing Tool Considered
The Valkey base and its three components of dan-petty/infra, at a release tag that Renovate updates. Valkey ACL with an aclfile, valkey-py through the existing ValkeyClient, and devops k8s push-secrets for the passwords. No new dependency. Cost: about 120,000 tokens and 3 hours to build.
Acceptance Criteria
- Test first: the secret plan holds one generated row for each user and one derived aclfile row, and the aclfile holds
user default off. The test fails on the base. - A test: the client of the instance sends the user and the password that its settings name.
- A test: with the instance down, a read through the accessor gives a miss and no error.
-
uv run devops ci --check --only k8spasses with the new folder. No test asserts a value of the manifest. - Live proof after the push and the merge: the pod is ready,
ACL USERSlistsagent,brainandmetricsanddefaultis off,redis_upis 1, a connection with no user is refused,agentgetsNOPERMon a write ofroadmap:v1:brain-item:probe, and a pod in another namespace cannot connect on TCP 6379. A comment gives the result lines.
Dependencies
None.
Related: #4563 (the parts that stay), #4676 (the index), #4517 and #4624 (trackers), #6600 (findings on role users), ADR 0021, ADR 0023, ADR 0032.
Source
Source: #4624
Proposed design
Problem statement
Do not merge before a person pushes the new valkey-roadmap-auth Secret and the plan reads unchanged. The brain index (#4676) needs a separate Valkey instance for the roadmap state. No valkey-roadmap instance exists in the cluster. This item adds the Kustomize instance, its setting and its ACL users brain, agent and metrics. It keeps the request windows, the GraphQL hold, the halt, the delivery ids and the sentinel in #4563. The split touches no stage or implement code, so the hold #6521 stays as it is.
Acceptance criteria
Requirement: The secret plan test fails on the base
The new secret plan test SHALL fail on the base commit.
Scenario: The test runs before the table changes
- WHEN
uv run pytest tests/k8s/test_cluster_secret_plan.py -qruns on the base commit with the new test. - THEN The test fails because the plan has no row for
devops/valkey-roadmap-auth.
Requirement: The valkey-roadmap secret rows
The cluster secret table SHALL declare devops/valkey-roadmap-auth with generated password rows for brain, agent and metrics, and a derived users.acl row.
Scenario: The secret plan lists the new rows
- WHEN
uv run pytest tests/k8s/test_cluster_secret_plan.py -qruns on the branch. - THEN The test passes and the plan holds a generated row for
brain,agentandmetrics, and a derived row forusers.acl.
Requirement: The default user is off
The derived aclfile of valkey-roadmap SHALL hold user default off.
Scenario: The aclfile starts with default off
- WHEN
uv run pytest tests/k8s/test_cluster_secret_plan.py -qruns on the branch. - THEN The test passes and the derived
users.aclvalue holds the lineuser default off.
Requirement: The ACL patterns of the three users
The aclfile SHALL give brain read and write on roadmap:v1:brain-*, agent read on roadmap:v1:brain-*, and metrics no key pattern.
Scenario: The aclfile holds the user patterns
- WHEN
uv run pytest tests/k8s/test_cluster_secret_plan.py -qruns on the branch. - THEN The test passes and the derived
users.aclvalue holdsuser brainwith read and write onroadmap:v1:brain-*,user agentwith read onroadmap:v1:brain-*, anduser metricswith no key pattern.
Requirement: The metrics user holds only scrape commands
The metrics user SHALL hold only the commands of the exporter scrape and no key pattern.
Scenario: The aclfile holds the metrics user
- WHEN
uv run pytest tests/k8s/test_cluster_secret_plan.py -qruns on the branch. - THEN The test passes and the
user metricsline holds no key pattern and only+info +config|get +dbsize +client|list +slowlog|get +memory|usage +ping.
Requirement: The client sends the ACL identity
The roadmap Valkey accessor SHALL give a ValkeyClient that sends the user and password from roadmap.valkey.username and roadmap.valkey.password.
Scenario: The accessor opens a client
- WHEN The unit test of the accessor runs with a fake
ValkeyClient. - THEN The test passes and the fake records the user and password from
roadmap.valkey.usernameandroadmap.valkey.password.
Requirement: A down instance gives a miss
A read through the roadmap accessor SHALL return a miss and no error when the instance does not answer.
Scenario: The instance refuses the connection
- WHEN The unit test of the accessor runs with a fake client that raises a connection error.
- THEN The test passes and the reader returns a miss without an exception.
Requirement: The k8s check passes
The k8s/devops/valkey-roadmap Kustomize folder SHALL pass the Kubernetes check.
Scenario: The k8s check reads the new folder
- WHEN
uv run devops ci --check --only k8sruns. - THEN The command exits 0 and reports no finding for
k8s/devops/valkey-roadmap.
Requirement: Pending a person before the merge
A person SHALL push the new valkey-roadmap-auth Secret and confirm that each key is unchanged before the merge.
Scenario: The secret push
- WHEN A person runs
uv run devops k8s push-secretsfrom the branch and thenuv run devops k8s push-secrets --plan. - THEN The plan shows
unchangedfor each key ofdevops/valkey-roadmap-auth.
Requirement: Pending a person after the merge: the live ACL
A person SHALL prove the live ACL users and the default user after the merge.
Scenario: The live ACL check
- WHEN A person runs
kubectl -n devops rollout status deploy/valkey-roadmapandkubectl -n devops exec deploy/valkey-roadmap -- valkey-cli ACL LISTafter the merge. - THEN The pod is Ready and the output holds
user agent,user brain,user metrics, anduser default off.
Requirement: Pending a person after the merge: the live refusals and exporter
A person SHALL prove the live refusals, the exporter scrape and the network boundary after the merge.
Scenario: The live probes
- WHEN A person runs
kubectl -n devops exec deploy/valkey-roadmap -- valkey-cli PING,kubectl -n devops exec deploy/valkey-roadmap -- valkey-cli --user agent --pass <agent-password> SET roadmap:v1:brain-item:probe x, the exporter scrape, and a connection from another namespace on TCP 6379 after the merge. - THEN The no-user
PINGprintsNOAUTH, theagentSETprintsNOPERM, the exporter showsredis_up 1, and the other namespace cannot connect on TCP 6379.
Existing Tool Considered
No alternatives check has run. The open, maintained tools are the Valkey base and its valkey-acl, valkey-exporter and valkey-persistence components from dan-petty/infra at a release tag, Valkey ACL files, valkey-py through the existing ValkeyClient, and devops k8s push-secrets. No new dependency is needed. The cost to build the same base and ACL handling is about 120,000 tokens and 3 hours.
Key questions
- Should the instance use the shared Valkey base from dan-petty/infra?: Yes. Use the shared base at a release tag with the
valkey-acl,valkey-exporterandvalkey-persistencecomponents. The base stays in infra, and the instance folder lives with the roadmap Service. (best practice) [sources: AGENTS.md, CONTEXT.md, src/devops_cli/k8s/cluster_secrets.py]- Chosen: Use the shared Valkey base at a release tag. It uses an open, maintained base and avoids a second Valkey implementation.
- Rejected: Build a new Valkey deployment in this repository. It adds code that the base already keeps and costs about 120,000 tokens and 3 hours.
- Which process sends which ACL user?: The roadmap Service pod sends
brain. The stage, implement and fix-checks containers sendagentand get theagentpassword because they already hold the private key of the App. The MCP server sendsagent. The exporter sendsmetrics. (best practice) [sources: src/devops_cli/roadmap/stores/brain_issues.py, src/devops_cli/roadmap/alternatives.py, src/devops_cli/k8s/cluster_secrets.py, openspec/specs/llm-valkey/spec.md:71]- Chosen: Service brain, jobs and MCP agent. The Service writes the brain index and the jobs read it, so each process sends the least user that its work needs.
- Rejected: All processes send brain. The stage and implement jobs would get write access to the brain keys that they do not need.
- Rejected: All processes send agent. The Service could not write the brain index.
- How does the
metricsuser handle the exporter commandsclient|setname,latency|latestandlatency|histogram?: Turn offclient|setname,latency|latestandlatency|histogramin the exporter values. Givemetricsthe same command set as thevalkey-devopsmetricsuser:+info +config|get +dbsize +client|list +slowlog|get +memory|usage +ping. (best practice) [sources: src/devops_cli/k8s/cluster_secrets.py, openspec/specs/llm-valkey/spec.md:71]- Chosen: Turn off the three exporter commands. It keeps the monitoring user at the command set that the existing instance proves and adds no write command.
- Rejected: Grant the three commands to metrics. It widens the command set of a monitoring user for metrics that no dashboard needs.
- What are the setting names and password wiring for the roadmap Valkey instance?: Use
roadmap.valkey.url,roadmap.valkey.usernameandroadmap.valkey.password. The Service pod setsDEVOPS_CLI_ROADMAP_VALKEY_PASSWORDfrom keybrainofdevops/valkey-roadmap-auth. The stage, implement, fix-checks and MCP server pods set it from keyagent. The exporter reads keymetrics. (best practice) [sources: src/devops_cli/config/settings.py, src/devops_cli/valkey/client.py:158, src/devops_cli/k8s/cluster_secrets.py]- Chosen: Use
roadmap.valkey.*and one password variable per workload. It names the instance and keeps the cachevalkey.urlseparate. - Rejected: Use
roadmap.state.*. It hides that the setting is the Valkey connection and differs from the existingvalkey.urlnaming.
- Chosen: Use
- Should the default user be off from the first start?: Yes. Keep
defaultoff from the first start. The new instance has no old client. (best practice) [sources: src/devops_cli/k8s/cluster_secrets.py, openspec/specs/llm-valkey/spec.md:71]- Chosen: Default off from the first start. The new instance has no old client that needs the default user.
- Rejected: Default on until a later item. It would leave an open user with full access for no client.
- Should
routerandsweepusers be part of this instance now?: No. Do not addrouterandsweepusers now. Add them in feat(service): share the GitHub budget and holds in Valkey #4563 with the first key that they reach. (best practice) [sources: src/devops_cli/k8s/cluster_secrets.py, openspec/specs/llm-valkey/spec.md:71]- Chosen: Add only
brain,agentandmetrics. A user with no key to reach gives no value and an unchecked pattern. - Rejected: Add
routerandsweepnow. Their key families arrive with feat(service): share the GitHub budget and holds in Valkey #4563, so their patterns have no test.
- Chosen: Add only
- Do the sentinel and the fail-closed coordination keys belong to this item?: No. Keep the sentinel and the fail-closed rule of the coordination keys in feat(service): share the GitHub budget and holds in Valkey #4563. This item adds a fail-soft reader for the brain index. (best practice) [sources: CONTEXT.md, src/devops_cli/valkey/client.py:158]
- Chosen: Keep sentinel and fail-closed coordination in feat(service): share the GitHub budget and holds in Valkey #4563. This item adds only the instance, the setting and the ACL users.
- Rejected: Add sentinel now. The instance has one consumer and no failover requirement in this item.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 26, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.
feat(k8s): add the valkey-roadmap instance, its setting and ACL users
docs(spec): archive the change of #7294
devops-cli-service commentedon Nov 26, 2026
Released in v0.222.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.222.0
devops-cli-service commentedon Nov 26, 2026
Live since 2026-11-26 15:41 UTC
dan-petty commentedon Nov 26, 2026
Live proof, 2026-11-26, after the push of the object
devops/valkey-roadmap-authand the merge of #7302:valkey-roadmapdefault off,brain on,agent on,metrics onAuthentication requireddefaultwith an empty passwordbrainACL WHOAMIgivesbrain);NOPERMon a key of another kindagentNOPERMonSET roadmap:v1:brain-item:probe; reads a brain key;NOPERMon a key of another kindmetricsNOPERMonGET; the exporter givesredis_up 1on its own port, and its log holds no erroraof_enabled1,maxmemory_policynoeviction,maxmemory128 MB; the store is emptydevopswith no client labelOne criterion is still open:
redis_upin Prometheus. The egress perimeter of namespacemonitoringdoes not admit TCP 9121 to namespacedevops, so no scrape reaches the exporter. dan-petty/homelab#285 holds that change and waits for an owner decision.No client uses the store yet. #4676 adds the first one.
dan-petty commentedon Nov 26, 2026
Live proof, 2026-11-26 19:55 UTC: after the merge of dan-petty/homelab#385, the egress perimeter of namespace
monitoringadmits TCP 8000, 8080 and 9121 to namespacedevops, and Prometheus holdsredis_up{namespace="devops",pod=~"valkey-roadmap.*"}with the value 1.redis_db_keysof the store is 620.docs(adr): record two facts of ADR 0023 that are out of date (#7360)