Namespace deletion leaves AI Gateway keys and AI providers in Coder
Maintainer antworten meist innerhalb von 1 Tag
@ThomasK33 arbeitet bereits daran.
Seit 14.10.2026.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
Problem
When a namespace is deleted, Kubernetes deletes the CoderControlPlane and its CoderAIGatewayKey objects at the same time. The operator then cannot reach Coder: the control plane is gone, or its Coder pod is already down when the bounded pass runs. So it releases the finalizers without deleting the keys, and full-trust gateway keys stay valid in Coder. CoderAIProvider has the same gap for providers.
Seen in the dogfood run of #346 (see the G3 evidence comment, step 13):
- The namespace was gone after 11 s.
- The key row stayed in Coder's
ai_gateway_keystable. - The operator logged
Releasing the finalizer without deleting the keys in Coderwith reasonControlPlaneGoneand the key ID.
Today the how-to (docs/how-to/manage-ai-gateway-keys.md) warns about this and gives the cleanup: delete the key objects before the namespace, or delete the logged keys with coder ai-gateway keys delete.
Options
- A cluster-wide sweeper (plan risk RK7) that deletes
ck8s-<uid>-keys whose UID noCoderAIGatewayKeyhas, after the settle window. The same idea works for providers. - Hold the control plane's deletion (a finalizer or a deletion check) while dependent
CoderAIGatewayKeyandCoderAIProviderobjects exist, so they are cleaned up first.
Related items to decide together
- While the control plane is being deleted, a failed operator-access read releases at once without a retry (#156 plan, K9 notes item q). This is a second path that leaves keys.
- The
CoderAnswerMismatchgate is lost when the status write right after the mismatch fails (K9 notes item u). The settle window bounds this to one extra create, whose key the sweep deletes. - A metric or a Kubernetes Event for
ControlPlaneGonereleases. Today the log line is the only signal.
Refs #156
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high
- Vorherrschende Sprache
- Go
- Sterne
- 5
- Forks
- 3
- Ø Merge
- 3 Std.
- Gemergte PRs (30 T.)
- 192
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus coder/coder-k8s
-
CoderWorkspacePoolMember checkCreate: trust only Coder's own 404 on the name lookup (before PR 12)Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
TestReconcile_LicenseRotationUploadsNewSecretValue fails at -count=3 (reuses a control plane name)Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag
-
CoderMCPServer Kind E2E follow-upsEvtl. vergeben @ThomasK33 hat das vor 5 Tagen übernommen. Offen
coder/coder-k8s#390 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
CoderMCPServer delete and RBAC test follow-upsEvtl. vergeben @ThomasK33 hat das vor 5 Tagen übernommen. Offen
coder/coder-k8s#378 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Ownership proof for Coder IDs recorded in controller status (D11 B)Evtl. vergeben @ThomasK33 hat das vor 5 Tagen übernommen. Offen
coder/coder-k8s#372 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in coder/coder-k8s
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 2 Tagen
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
devlikeapro/waha#2322 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
validateDeclaredPath lets control characters through into the Gradle init script's Groovy literalOffenagent-butler-finding agent-research bug ready-for-agent
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
jordansmall/spindrift#5821 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 1 Tag
-
[rmqctl][Bug] Windows build script fails when the output directory is absentEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
apache/rocketmq-dashboard#7243 ·
Maintainer antworten meist innerhalb von 3 Tagen