Skip to content

feat(k8s): add the valkey-roadmap instance, its setting and ACL users #7294

Done

Description

@dan-petty

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

  1. The instance. A Kustomize folder in k8s/devops builds valkey-roadmap from the shared Valkey base of dan-petty/infra (k8s/bases/valkey) at a release tag, with the components valkey-acl, valkey-exporter and valkey-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 with appendfsync everysec, noeviction, a 2Gi local-path volume, and ingress from namespace devops only on TCP 6379, with the exporter port for namespace monitoring. The pod gets no egress.
  2. 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 writes roadmap:v1:brain-*, feat(roadmap): keep alternatives results in a brain index #4676), agent (reads roadmap:v1:brain-* and writes no key) and metrics for the exporter. The users router and sweep of 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 in src/devops_cli/k8s/cluster_secrets.py, and the aclfile is a derived entry, in the form of the valkey-devops rows of feat(k8s): give valkey-devops one ACL user for each role #4704.
  3. 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 existing ValkeyClient, apart from the cache tier of valkey-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):

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 k8s passes 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 USERS lists agent, brain and metrics and default is off, redis_up is 1, a connection with no user is refused, agent gets NOPERM on a write of roadmap: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 -q runs 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 -q runs on the branch.
  • THEN The test passes and the plan holds a generated row for brain, agent and metrics, and a derived row for users.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 -q runs on the branch.
  • THEN The test passes and the derived users.acl value holds the line user 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 -q runs on the branch.
  • THEN The test passes and the derived users.acl value holds user brain with read and write on roadmap:v1:brain-*, user agent with read on roadmap:v1:brain-*, and user metrics with 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 -q runs on the branch.
  • THEN The test passes and the user metrics line 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.username and roadmap.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 k8s runs.
  • 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-secrets from the branch and then uv run devops k8s push-secrets --plan.
  • THEN The plan shows unchanged for each key of devops/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-roadmap and kubectl -n devops exec deploy/valkey-roadmap -- valkey-cli ACL LIST after the merge.
  • THEN The pod is Ready and the output holds user agent, user brain, user metrics, and user 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 PING prints NOAUTH, the agent SET prints NOPERM, the exporter shows redis_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-exporter and valkey-persistence components. 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 send agent and get the agent password because they already hold the private key of the App. The MCP server sends agent. The exporter sends metrics. (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 metrics user handle the exporter commands client|setname, latency|latest and latency|histogram?: Turn off client|setname, latency|latest and latency|histogram in the exporter values. Give metrics the same command set as the valkey-devops metrics user: +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.username and roadmap.valkey.password. The Service pod sets DEVOPS_CLI_ROADMAP_VALKEY_PASSWORD from key brain of devops/valkey-roadmap-auth. The stage, implement, fix-checks and MCP server pods set it from key agent. The exporter reads key metrics. (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 cache valkey.url separate.
    • Rejected: Use roadmap.state.*. It hides that the setting is the Valkey connection and differs from the existing valkey.url naming.
  • Should the default user be off from the first start?: Yes. Keep default off 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 router and sweep users be part of this instance now?: No. Do not add router and sweep users 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]
  • 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]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/feature
    scope/k8s
    source/agent
    status/new
    value/medium
    effort/medium
    on Nov 26, 2026
  2. added
    priority/p2-medium
    priority/p1-high
    owner/agent
    status/in-progress
    and removed
    priority/p2-medium
    status/new
    on Nov 26, 2026
  3. devops-cli-service commented on Nov 26, 2026

    @devops-cli-service
    Contributor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

  4. added
    status/in-review
    and removed
    status/in-progress
    on Nov 26, 2026
  5. removed
    status/in-review
    owner/agent
    on Nov 26, 2026
  6. devops-cli-service commented on Nov 26, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-26 15:41 UTC

  7. dan-petty commented on Nov 26, 2026

    @dan-petty
    OwnerAuthor

    Live proof, 2026-11-26, after the push of the object devops/valkey-roadmap-auth and the merge of #7302:

    Check Result
    Pod of valkey-roadmap 2 of 2 containers ready, 0 restarts, 30 minutes
    User lines of the aclfile default off, brain on, agent on, metrics on
    Connection with no user Authentication required
    User default with an empty password refused: the user is disabled
    brain authenticates (ACL WHOAMI gives brain); NOPERM on a key of another kind
    agent NOPERM on SET roadmap:v1:brain-item:probe; reads a brain key; NOPERM on a key of another kind
    metrics NOPERM on GET; the exporter gives redis_up 1 on its own port, and its log holds no error
    Settings of the store aof_enabled 1, maxmemory_policy noeviction, maxmemory 128 MB; the store is empty
    Pod of another namespace, with the client label refused on TCP 6379 in 6 tries over 36 seconds
    Pod of namespace devops with no client label refused on TCP 6379 in 6 tries over 36 seconds

    One criterion is still open: redis_up in Prometheus. The egress perimeter of namespace monitoring does not admit TCP 9121 to namespace devops, 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.

  8. dan-petty commented on Nov 26, 2026

    @dan-petty
    OwnerAuthor

    Live proof, 2026-11-26 19:55 UTC: after the merge of dan-petty/homelab#385, the egress perimeter of namespace monitoring admits TCP 8000, 8080 and 9121 to namespace devops, and Prometheus holds redis_up{namespace="devops",pod=~"valkey-roadmap.*"} with the value 1. redis_db_keys of the store is 620.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p1-highscope/k8ssource/agenttype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions