Repository navigation
Description
Update 2026-11-26 (infra move): the ACL line is product code, and the manifest is in dan-petty/homelab.
Change user default on in DEVOPS_CACHE_VALKEY_ACL_TEMPLATE (src/devops_cli/k8s/cluster_secrets.py), then push Secret llm/valkey-devops-auth and restart the pod. k8s/llm/valkey-devops.yaml is in homelab; its exporter already uses user metrics. No role user of the template may run ACL LIST: plan that check.
Problem
#4704 gives valkey-devops one ACL user for each role. Argo CD applies the aclfile at the merge, but a Service image that sends valkey.username runs only after a release. With user default off, each cache client fails AUTH until that release, for example mcp-server and the CronJob. So #4704 keeps the default user on (owner answer on #4624, 2026-11-21).
While the default user is on, a pod with the shared password can read every key of valkey-devops.
Scope
- After a release with
valkey.usernamesupport runs in the cluster, setuser default offin the aclfile ofvalkey-devops(DEVOPS_CACHE_VALKEY_ACL_TEMPLATEinsrc/devops_cli/k8s/cluster_secrets.py). - Before the change, an agent checks that each client of
valkey-devopsconnects with a role user.
Acceptance criteria
- Before the merge:
valkey-cli CLIENT LISTshows no client withuser=default, except the check itself. Before it runs a command in thevalkey-devopspod, the agent checks the memory headroom of the pod. - After the merge:
ACL LIST, with the passwords masked, holdsuser default off. - After the merge: a connection with no user name and the old shared password is refused.
- After the merge: no client of
valkey-devopslogs an AUTH failure (WRONGPASSorNOAUTH) in 24 hours.
Dependencies
- feat(k8s): give valkey-devops one ACL user for each role #4704
- A release with
valkey.usernamesupport runs in the cluster.
Alternatives check of 2026-11-27: in-use.
The repository already uses this tool.
Tool: valkey-io/valkey (https://github.com/valkey-io/valkey), BSD-3-Clause, last activity 2026-11-27, maintained.
Reason: Searches found no tool that turns off a default user in a manifest-embedded aclfile; valkey-cli covers only the live ACL LIST, CLIENT LIST and refused-AUTH checks, while the template edit, memory check and 24-hour log watch stay manual.
Covers:
- ACL LIST shows each user and whether default is off
- CLIENT LIST shows the user of each connected client
- ACL SETUSER can turn the default user off at runtime
- AUTH with no user name fails against a disabled user
Lacks:
- Applies no change to DEVOPS_CACHE_VALKEY_ACL_TEMPLATE or the homelab manifest
- Reads no pod memory headroom before a command runs
- Watches no 24 hours of WRONGPASS or NOAUTH log lines
- Declarative ACL users need an operator deployment that this plain Deployment lacks
Proposed design
Problem statement
The aclfile of valkey-devops keeps default on with every key pattern and command. A pod with the shared password reads and writes every key. This change turns default off in DEVOPS_CACHE_VALKEY_ACL_TEMPLATE. It adds tests that no role user can run ACL LIST.
Acceptance criteria
Requirement: Default user off
DEVOPS_CACHE_VALKEY_ACL_TEMPLATE SHALL render a line that starts with user default off and SHALL render no line that starts with user default on.
Scenario: The template renders the default user off
- WHEN A test formats
DEVOPS_CACHE_VALKEY_ACL_TEMPLATEwith a fixed value for each field - THEN One line starts with
user default off, no line starts withuser default on, and thedefaultline holds no~key pattern and no+command
Requirement: No role user runs ACL LIST
The template MUST grant the ACL command to no user other than default.
Scenario: The role lines hold no ACL command
- WHEN A test formats
DEVOPS_CACHE_VALKEY_ACL_TEMPLATEwith a fixed value for each field - THEN No line for
sweep,brain,agentormetricsholds+aclor+acl|list, and each line that holds+@allalso holds-@dangerous
Requirement: The row keeps the derived aclfile
The row llm/valkey-devops-auth of CLUSTER_SECRETS MUST derive key users.acl from DEVOPS_CACHE_VALKEY_ACL_TEMPLATE and MUST keep deployment/valkey-devops in restarts.
Scenario: The row derives users.acl and restarts the Deployment
- WHEN A test reads
CLUSTER_SECRETSfor the rowllm/valkey-devops-auth - THEN The
users.aclentry holds aDerivedSourcewith that template, andrestartsholdsdeployment/valkey-devops
Requirement: Pending a person after the merge
Before the Secret push, each client of valkey-devops MUST show a user other than default.
Scenario: CLIENT LIST shows no default client
- WHEN A person checks the memory headroom of the pod and runs
kubectl -n llm exec deploy/valkey-devops -c valkey -- valkey-cli --user metrics --pass "$VALKEY_METRICS_PASSWORD" CLIENT LIST - THEN Each line holds a
user=value other thandefault
Requirement: Pending a person after the merge
After the push, the aclfile that the pod mounts MUST hold user default off.
Scenario: The pushed aclfile holds user default off
- WHEN After the push, a person runs
kubectl -n llm get secret valkey-devops-auth -o jsonpath='{.data.users\.acl}' | base64 -d - THEN The output holds one line that starts with
user default offand no line that starts withuser default on
Requirement: Pending a person after the merge
After the push, a connection with no user name and the old shared password MUST fail.
Scenario: The shared password alone gets WRONGPASS
- WHEN After the push, a person runs
kubectl -n llm exec deploy/valkey-devops -c valkey -- valkey-cli -a "$VALKEY_PASSWORD" PING - THEN The server replies
-WRONGPASS invalid username-password pair or user is disabled.
Requirement: Pending a person after the merge
After the push, no client of valkey-devops MUST log an AUTH failure for 24 hours.
Scenario: 24 hours of Loki lines hold no AUTH failure
- WHEN 24 hours after the push, a person runs
uv run devops k8s logs --query '{namespace=~"devops|llm"} |~ "WRONGPASS|NOAUTH"' --since=24h - THEN The query prints no log line
Existing Tool Considered
The alternatives check of 2026-11-27 in the issue body records the verdict in-use for valkey-io/valkey (https://github.com/valkey-io/valkey), BSD-3-Clause, maintained. The repository already uses the tool. The block lists what the tool covers and lacks. This change edits DEVOPS_CACHE_VALKEY_ACL_TEMPLATE and adds source tests. A person runs the live checks. The change builds no tool, so the cost to build is zero tokens and no code needs keeping.
Key questions
- Which file holds the ACL users of
valkey-devops?:src/devops_cli/k8s/cluster_secrets.py.DEVOPS_CACHE_VALKEY_ACL_TEMPLATEat line 61 holds the five user lines._DEVOPS_CACHE_VALKEY_ACLrenders them into keyusers.aclof Secretllm/valkey-devops-auth. [sources: src/devops_cli/k8s/cluster_secrets.py:61, src/devops_cli/k8s/cluster_secrets.py] - Does this change edit a Kubernetes manifest?: No. devops-cli holds no environment tree. The manifest
k8s/llm/valkey-devops.yamlis in dan-petty/homelab. This change edits the product template only, so nokubectl kustomizerender applies. [sources: CONTEXT.md, src/devops_cli/k8s/cluster_secrets.py] - What does the
defaultline hold after the change?:user default off >{password}. The line holds no key pattern and no command. The password field stays, so the inputpasswordof_DEVOPS_CACHE_VALKEY_ACLstays used and keypasswordof the Secret keeps its meaning. (best practice) [sources: src/devops_cli/k8s/cluster_secrets.py:62, src/devops_cli/k8s/cluster_secrets.py]- Chosen:
user default off >{password}. The password field stays used, and the disabled user keeps no key pattern and no command. - Rejected:
user default offwith no password. The inputpasswordof the derived source becomes unused while keypasswordmust stay in the Secret. - Rejected: Keep
user default on >{password} ~* &* +@all. The item exists to turn the default user off.
- Chosen:
- How does the template keep every role user from running
ACL LIST?: A source test formats the template. It asserts that no line forsweep,brain,agentormetricsholds+aclor+acl|list, and that each line with+@allalso holds-@dangerous. The live check reads keyusers.aclof the Secret, because no role user holds theACLcommand. (best practice) [sources: src/devops_cli/k8s/cluster_secrets.py:62-66]- Chosen: Source test of the template and a read of the Secret key. The test checks the product template offline, and the Secret read needs no ACL command.
- Rejected: Give a role user
+acl|list. It grants an admin command to a role user. - Rejected: Run
ACL LISTasdefault. The change turnsdefaultoff, so it cannot authenticate after the push.
- Which command audits the clients before the Secret push?:
kubectl -n llm exec deploy/valkey-devops -c valkey -- valkey-cli --user metrics --pass "$VALKEY_METRICS_PASSWORD" CLIENT LIST. Each line holds auser=value other thandefault. The audit runs before the push, because the currentmetricsline holds+client|listand the check needs that command. (best practice) [sources: src/devops_cli/k8s/cluster_secrets.py:66]- Chosen:
CLIENT LISTasmetricsbefore the push. The currentmetricsline holds+client|list, and each line names the user of a client. - Rejected:
CLIENT LISTassweep.sweepholds-@dangerous, so an admin command can fail. - Rejected:
ACL LIST. No role user holds theACLcommand, so it fails withNOPERM.
- Chosen:
- How does the changed aclfile reach the running server?: A person runs
uv run devops k8s push-secrets --only llm/valkey-devops-authafter the release. The row namesdeployment/valkey-devopsinrestarts, so the push restarts the pod. The server loads the mounted aclfile at its start. (best practice) [sources: src/devops_cli/k8s/cluster_secrets.py]- Chosen: Push the Secret and restart the Deployment. The pod mounts key
users.aclas its aclfile, so a restart loads the new rules. - Rejected: Run
ACL SETUSERin the pod. The next start of the pod loads the old file again.
- Chosen: Push the Secret and restart the Deployment. The pod mounts key
- Does feat(k8s): give valkey-devops one ACL user for each role #4704 remain a dependency?: No. The template at
src/devops_cli/k8s/cluster_secrets.py:61already holds thesweep,brain,agentandmetricsusers of feat(k8s): give valkey-devops one ACL user for each role #4704. The release withvalkey.usernamesupport remains a suspected block. [sources: src/devops_cli/k8s/cluster_secrets.py:61] - Can the implement job run the live cluster checks?: No. The runner pod holds no Kubernetes token. A person runs the live checks from a host with cluster access. [sources: CONTEXT.md]
- Which command reads 24 hours of AUTH failures?:
uv run devops k8s logs --query '{namespace=~"devops|llm"} |~ "WRONGPASS|NOAUTH"' --since=24h, the LogQL client of the repository. It reads the log lines of namespacedevops, where the Service runs, and of namespacellm, where the exporter runs. (best practice) [sources: docs/CLI_REFERENCE.md]- Chosen:
devops k8s logs. The repository maintains and documents this LogQL client, and it sends the query to Loki. - Rejected:
kubectl logs --since=24h. A pod keeps no log across a restart, and the pod of a Job is gone before 24 hours end.
- Chosen:
Fit
Fits in one pull request.
Suspected block
The release that carries the valkey.username client support must run in the cluster before a person pushes Secret llm/valkey-devops-auth.
Dependencies
None.
Activity
dan-petty commentedon Nov 21, 2026
Both work on valkey-devops ACL users. #4704 creates the role users; the candidate disables the default user after clients migrate to role users.devops-cli-service commentedon Nov 21, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (3)
Searches run:
Sources:
devops-cli-service commentedon Nov 22, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies and Watched files in the section Proposed design of the body.
devops-cli-service commentedon Nov 24, 2026
Owner question: See Suspected block and Watched files in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
dan-petty commentedon Nov 26, 2026
Findings of 2026-11-26 that change the plan of this item (review of the project brain, #4624).
valkey-devopsstill starts withrequirepassonly, and the objectllm/valkey-devops-authholds the keypasswordonly. The manifest part is dan-petty/homelab#261 (draft pull request dan-petty/homelab#262). A person runsuv run devops k8s push-secrets --only llm/valkey-devops-authbefore that merge.DEVOPS_CACHE_VALKEY_ACL_TEMPLATEand throwaway passwords gave:sweepwritesvalkey:roadmap:*, and getsNOPERMonvalkey:rag:embedding:*.sweepholds no pattern forvalkey:brain:*. The Service pod writes the listing snapshot (valkey:roadmap:*), the embeddings (valkey:rag:*) and the tool facts (valkey:brain:*). Withvalkey.username: sweep, two of its three caches fail. Before the default user goes off, each client needs either one user for each store or a user whose patterns hold each store of its process.roadmap:v1:brain-issue:*(feat(service): Cache GitHub issue and PR state in the brain from webhooks #6013) matches no pattern.sweepgotNOPERMon a key of that form in the test. fix(roadmap): the brain issue cache follows the shared-tier rules #7292 moves the key and must merge before a client sends a role user.user=default" of this item passes for them for the wrong reason.metricslacks three commands that the exporter sends.client|setnamegave one error line for each scrape; dan-petty/homelab#262 turns that command off in the exporter.latency|latestandlatency|histogramgive one line each at the start of the exporter. The latency percentiles ofINFOare still exported.dan-petty commentedon Nov 26, 2026
More evidence for finding 5 of the comment above, from the build of #7294 (2026-11-26).
ACL LOGandINFO commandstatsof a probe with redis_exporter v1.99.0 and Valkey 9.2.1 show the commands that the exporter sends at a scrape:info,config|get,latency|latest,latency|histogram,slowlog|len,slowlog|get,commandlog|len,command|infoandclient|setname.The user
metricsofDEVOPS_CACHE_VALKEY_ACL_TEMPLATEholds 7 commands. It lacks 6 of the 9 (client|setname,latency|latest,latency|histogram,slowlog|len,commandlog|len,command|info), and it holds 4 that the exporter did not send (dbsize,client|list,memory|usage,ping). The exporter ofvalkey-devopsworks (redis_upis 1), because dan-petty/homelab#262 turnedclient|setnameoff and the other refusals only remove their metrics.The template of
valkey-roadmap(#7302) grants the 9 commands. When this item changes the aclfile ofvalkey-devops, give its usermetricsthe same 9 commands and remove the 4 unused ones.dan-petty commentedon Nov 27, 2026
Design check, 2026-11-26
Body: no change. The update of 2026-11-26 is correct: this repository holds the template. The users
sweep,brainandagenthave-@dangerous, andmetricshas a fixed command list (src/devops_cli/k8s/cluster_secrets.py:62-66).Refine block
k8s/llm/valkey-devops.yaml. This repository does not hold that file.VALKEY_ADMIN_USER. The template has no admin user. Its users aredefault,sweep,brain,agentandmetrics.Findings that the design does not hold (owner comments of 2026-11-26)
sweephas no pattern forvalkey:rag:*orvalkey:brain:*(src/devops_cli/k8s/cluster_secrets.py:63).metricslacks 6 of the 9 commands that the exporter sends.Dependencies: #4704 is closed. Not verified: that a release with
valkey.usernameruns in the cluster, and that each client sends a role user.devops-cli-service commentedon Nov 27, 2026
The result in the alternatives block of the issue body changed. Before this check:
none, no tool. A person decides what the new result means for the item.Searches (7)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 27, 2026
Owner question: See Suspected block and Watched files in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 28, 2026
Owner question: See Suspected block and Watched files in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 28, 2026
Owner question: See Suspected block in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence