🤖 Operator token record: residual limits after #428
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 一週以上
- 新手友好度
- 30/100
研究方向
Read PR #428 and the linked discussion threads for each item to locate the reconcile code writing status.operatorAccessReady and operatorTokenSecretRef. Check docs/how-to/deploy-controller.md for the hash/URL item. Done means each listed residual limit is fixed with live readiness writes and a recorded database identity.
由索引模型根據 Issue 內容生成。
描述
Follow-ups that PR #428 (fix for #406) leaves open. Each one needs more than a small change in the operator token record, so #428 documents it or leaves it here.
- Readiness during a database change. When a ready control plane moves to a database with another hash,
status.operatorAccessReadystaystrue, with the oldstatus.operatorTokenSecretRef, until the final status write of that reconcile. This matchesmain. During that window, consumers send the old token to the new database and get 401s at the control plane origin. No token goes to another origin. A fix sets readiness tofalsein the record write before the create. It also needs a live write that restores readiness, because the final status write merges only the fields that changed against the first read of the reconcile. Codex thread: https://github.com/coder/coder-k8s/pull/428#discussion_r4429874209 - Secret rename on a record from an earlier version. When an upgraded control plane has a record without
status.operatorTokenIDandspec.operatorAccess.generatedTokenSecretNamechanges, the rotation deletes the old token and writes the new one only to the renamed Secret. If the final status write fails, or the controller stops, status still names the old Secret withoperatorAccessReady=true, so consumers get 401s until the next reconcile. This matchesmain, where a rename also always rotates because the renamed Secret is empty. The fix is the same live readiness write as item 1. Codex thread: https://github.com/coder/coder-k8s/pull/428#discussion_r4430006050 - One record per control plane. When a control plane that owns its Secret moves to another database, the controller records the new database before it provisions there. It then no longer deletes a token in the earlier database.
mainalso forgot that token. Keeping the old record would block operator access after every URL change. A fix needs a second record (a status field) and a way to reach the old database. - The hash names a URL, not a server (#406 item 5, documented in
docs/how-to/deploy-controller.md). A sound fix records a database identity read from the server, for example Coder's deployment ID, and checks it inside the delete transaction. --cascade=orphan(#406 item 3, documented). Readers cannot tell an orphaned Secret from a replaced one without a record of the Secret's UID.
Not in scope here: a record from a create that failed before its commit no longer authorizes a delete by name. #428 fixes that case with status.operatorTokenID.
Trigger: the next change to operator access, or a report of a token that stayed valid or was deleted in the wrong database.
Refs #406, #428
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: xhigh
- 主要語言
- Go
- 星號
- 5
- 分支
- 3
- 平均合併
- 2 小時 50 分鐘
- 30 天內合併 PR
- 200
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
coder/coder-k8s 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 45/100
維護者通常 1 天內回覆
-
🤖 perf: pool members read GET /api/v2/users/me on every workspace read, doubling the request budget未關閉
難度 3/5 1-2 天 新手友好度 65/100
維護者通常 1 天內回覆
-
Ownership proof for Coder IDs recorded in controller status (D11 B)可能已有人在做 @ThomasK33 於 18 天前認領。 未關閉
coder/coder-k8s#372 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
🤖 Intermittent data race in vendored apiserver secure serving under go test -race可能已有人在做 @ThomasK33 於 19 天前認領。 未關閉
coder/coder-k8s#233 · 1 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
CoderTemplateTest deferred items可能重新可做 @ThomasK33 於 28 天前認領,目前沒有進行中的 PR。 未關閉
coder/coder-k8s#218 · 已指派 1 人 ·
維護者通常 1 天內回覆
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 2 天內回覆
-
needs-triage
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 85/100
kagent-dev/kagent#3462 ·
維護者通常 1 天內回覆
-
netrc credential source accepts a password with an embedded CR/LF that every other source rejects未關閉agent-butler-finding bug
難度 2/5 1-3 小時 新手友好度 76/100
jordansmall/spindrift#6268 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 7 天內回覆