Skip to content

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

Merged
dan-petty merged 2 commits into
mainfrom
feat/7294-valkey-roadmap-instance-setting-acl
Nov 26, 2026
Merged

dan-petty merged 2 commits into
mainfrom
feat/7294-valkey-roadmap-instance-setting-acl

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Add the Valkey store valkey-roadmap to the product base, with its ACL users and the settings of its client. The brain index (#4676) needs a store that keeps its data and gives each role one user. It does not wait for the other parts of #4563.

k8s/devops/valkey-roadmap builds the shared Valkey base of dan-petty/infra at v0.24.1 with its persistence, exporter and ACL components. The store keeps an append-only file on a 2Gi claim and evicts no key. It admits only labelled pods of namespace devops, and it has no egress.

The Secret table generates one password for each of brain, agent and metrics, and derives the aclfile. The user default is off.

roadmap.state.url, roadmap.state.username and the credential roadmap.state.password name the store and its user. roadmap_state_tier() gives the one client tier of a process, apart from the cache tier. A reader fails soft: a read is a miss while the store is down or not configured.

Closes #7294

Change: openspec/changes/archive/2026-11-26-7294-valkey-roadmap-instance-setting-acl/

@dan-petty dan-petty added type/feature Type feature: a new function scope/k8s Kubernetes commands, Helm charts, pods, services, and policies labels Nov 26, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Notes for the review of the head commit abe828bb280daf419def7c8216761a6d3c9ee0a7. The body holds what the change does. This comment holds the steps of a person, the check results and the gaps.

Steps of a person

  1. Before the merge. Run uv run devops k8s push-secrets --only devops/valkey-roadmap-auth from this branch. Then run uv run devops k8s push-secrets --only devops/valkey-roadmap-auth --plan. Merge only when each of the 4 keys (brain, agent, metrics, users.acl) reads unchanged. The pod of valkey-roadmap does not start while the key users.acl is missing. No other pod reads the new Secret. An agent did not run the push or the plan: both read the keyring.
  2. A change of the environment repository. monitoring-default-perimeter-egress admits namespace devops on TCP 8000 and 8080 only. Add TCP 9121 to that rule. Until then Alloy cannot scrape the exporter, and redis_up of the store is absent.
  3. After the merge. Run uv run devops k8s deploy-stack --stack devops from a checkout of main, when push-secrets --stack devops --plan shows each key unchanged. It writes roadmap.state.url to ConfigMap devops-cli-config. No pod calls the URL until feat(roadmap): keep alternatives results in a brain index #4676.
  4. Live proof of feat(k8s): add the valkey-roadmap instance, its setting and ACL users #7294, after the sync. The pod is ready. ACL USERS lists agent, brain, default and metrics, and ACL GETUSER default shows off. redis_up is 1 (after step 2). valkey-cli ping with no user prints NOAUTH Authentication required.. agent gets NOPERM on HSET roadmap:v1:brain-item:probe f v. A pod in another namespace gets no answer on TCP 6379.

Checks on the branch

Command Result
uv run devops ci --check --only lint,format,docs,constructs,openspec,test-settings,test-tree,startup-imports,swallowed-failures,k8s,kube-linter,domain each row passes; k8s: 273 cases, 0 failed
uv run devops ci test tests/invariants tests/valkey/test_roadmap_state_tier.py tests/k8s/test_cluster_secret_plan.py tests/k8s/test_cluster_secret_push.py tests/security/test_config_declarations.py 527 passed
uv run pytest -n 4 tests/valkey tests/k8s tests/security/test_config_declarations.py tests/invariants tests/commands/k8s tests/commands/test_config_audit_keys.py tests/roadmap/stores tests/server/routes/test_webhooks_brain.py 2366 passed
uv run pytest -n 4 tests/commands tests/roadmap/test_roadmap_alternatives.py tests/ui/test_ui_docker_provider.py tests/server tests/telemetry (before the rebase) 4653 passed
uv run mypy on the 6 changed modules of src/ no issues
uv run devops k8s image-pins k8s/devops/valkey-roadmap the 2 images resolve

The new tests failed on the base before the code: uv run pytest -n 4 tests/k8s/test_cluster_secret_plan.py -k "valkey_roadmap or table_holds" gave 2 failed, and uv run pytest -n 4 tests/valkey/test_roadmap_state_tier.py tests/security/test_config_declarations.py gave 8 failed and 11 passed. The full devops ci did not run on the workstation.

Probe of the aclfile

A throwaway pod on the workstation ran the command of the rendered Deployment with Valkey 9.2.1, the valkey.conf of this change, an aclfile of the template with throwaway passwords, and redis_exporter v1.99.0. No command went to the cluster.

  • A connection with no user: NOAUTH Authentication required.
  • brain: HSET roadmap:v1:brain-item:o/n:1 gave 1, and SET roadmap:v1:window:o/n gave NOPERM No permissions to access a key.
  • agent: HGET of that hash gave the value, and HSET gave NOPERM User agent has no permissions to run the 'hset' command.
  • metrics: redis_up 1, an empty ACL LOG after two scrapes, and no error line of the exporter.

Gaps between the issue and the base

  • The base reads a password for requirepass also when the user default is off. The container valkey of k8s/bases/valkey reads VALKEY_PASSWORD from the key password of a Secret. Valkey ignores requirepass when it reads an aclfile. The overlay patches the variable to an empty value, so the Secret holds no password that opens nothing. Valkey 9.2.1 started with requirepass "" in the probe.
  • The exporter sends 9 commands, not the 7 of the user metrics of valkey-devops. ACL LOG of the probe gave info, config|get, latency|latest, latency|histogram, slowlog|len, slowlog|get, commandlog|len, command|info and client|setname. The exporter did not send dbsize, client|list, memory|usage or ping. The new template holds the 9. The template of valkey-devops is not changed here (feat(k8s): turn off the valkey-devops default user #6600).
  • The suffix names each object. nameSuffix: -roadmap gives the Deployment and the Service the name valkey-roadmap. It also gives valkey-data-roadmap and valkey-ingress-roadmap, valkey-egress-roadmap and valkey-exporter-ingress-roadmap.
  • A build of k8s/devops now needs git and github.com. The k8s row makes 3 such builds (about 6 seconds each). A pod with no network, such as the planner run pod of ADR 0018, cannot build the folder.
  • The base pins Valkey 9.2.1. ADR 0021 section 3 names 9.1.3. The base holds the newer release.
  • The volume is on a worker node, not on "the node of the sweep volume". The sweep volume of ADR 0021 does not exist yet. The pod has the node affinity of each pod on a claim.
  • No client pod has the label valkey-client: "true", the user or the password. feat(roadmap): keep alternatives results in a brain index #4676 adds its first client with the label, an egress rule to the store and the two variables. docs/CLUSTER.md (valkey-roadmap) gives the user of each process.

The folder k8s/devops/valkey-roadmap builds the store of the shared state of
the roadmap jobs from the Valkey base of dan-petty/infra at v0.24.1. The
Secret table generates the passwords of the users brain, agent and metrics
and derives the aclfile, with the user default off. The settings
roadmap.state.url and roadmap.state.username and the credential
roadmap.state.password name the store, and roadmap_state_tier() gives the
one client tier of a process, which fails soft.

Refs #7294
@dan-petty
dan-petty force-pushed the feat/7294-valkey-roadmap-instance-setting-acl branch from abe828b to 0f0eb11 Compare November 26, 2026 15:07
@dan-petty

Copy link
Copy Markdown
Owner Author

Review of the coordinator, 2026-11-26. The branch is rebased on main at 0f0eb11, after #7296 and #7297 merged.

Step of a person before the merge. Run the push from the code of this branch, because main does not hold the new rows:

cd .data/agent/worktrees/w-7294 && uv run devops k8s push-secrets --only devops/valkey-roadmap-auth
uv run devops k8s push-secrets --only devops/valkey-roadmap-auth --plan

Merge when each key (brain, agent, metrics, users.acl) reads unchanged. Only the new pod reads this object, so no other workload waits for it.

Test of the rendered store. I applied the output of kubectl kustomize k8s/devops/valkey-roadmap to a temporary namespace, with an aclfile from ROADMAP_STATE_VALKEY_ACL_TEMPLATE and throwaway passwords, and removed the namespace after the test.

Check Result
Rollout 2 of 2 containers ready, 0 restarts
Connection with no user Authentication required
User default, with an empty password and with another password refused: the user is disabled (the base writes requirepass "", and the aclfile wins)
brain writes roadmap:v1:brain-item:* and the stream roadmap:v1:brain-events; NOPERM on roadmap:v1:limits:*, on FLUSHALL and on ACL USERS
agent reads a brain key; NOPERM on SET, on a key of another kind and on FUNCTION FLUSH
metrics redis_up is 1, the exporter logs no error, NOPERM on GET
Settings of the store aof_enabled 1, maxmemory_policy noeviction, maxmemory 128 MB
Restart of the pod the brain key and the stream entry are still there
Pod with the label valkey-client: "true" in the namespace connects on TCP 6379
Pod with no label in the namespace, and a pod of another namespace refused

Facts for #4676, which adds the first client.

  • A client pod needs the label valkey-client: "true", the user and the password of its role. The policy file of a client belongs in k8s/devops, outside this folder.
  • A new client pod was refused for its first seconds: the first try at the start of the pod failed, and a try 15 seconds later connected. The network policy needs that time for a new pod. The breaker of the tier opens for 60 seconds after one failure, so a client that reads in its first second gets a miss for a minute.
  • The live ConfigMap needs roadmap.state.url when the first client ships. Nothing reads the setting before that.

Not in this pull request.

  • Monitoring cannot scrape the exporter yet: the egress perimeter of namespace monitoring in dan-petty/homelab admits namespace devops on TCP 8000 and 8080 only. The store runs without it; only redis_up is missing until that rule has TCP 9121.
  • The exporter finding for valkey-devops (its user metrics lacks 6 commands) is on feat(k8s): turn off the valkey-devops default user #6600.

@dan-petty
dan-petty marked this pull request as ready for review November 26, 2026 15:15
@dan-petty
dan-petty merged commit 168f2ad into main Nov 26, 2026
29 checks passed
@dan-petty
dan-petty deleted the feat/7294-valkey-roadmap-instance-setting-acl branch November 26, 2026 15:21
dan-petty-release Bot added a commit that referenced this pull request Nov 26, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.222.0](v0.221.15...v0.222.0)
(2026-11-26)


### Features

* **k8s:** add the valkey-roadmap instance, its setting and ACL users
([#7302](#7302))
([168f2ad](168f2ad))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/k8s Kubernetes commands, Helm charts, pods, services, and policies type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant