Namespace deletion leaves AI Gateway keys and AI providers in Coder
Maintainer thường phản hồi trong vòng 1 ngày
@ThomasK33 đang làm issue này rồi.
Từ ngày 14/10/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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
- Ngôn ngữ chính
- Go
- Star
- 5
- Fork
- 3
- Merge trung bình
- 3 giờ
- Pull request đã merge (30 ngày)
- 192
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của coder/coder-k8s
-
CoderWorkspacePoolMember checkCreate: trust only Coder's own 404 on the name lookup (before PR 12)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
TestReconcile_LicenseRotationUploadsNewSecretValue fails at -count=3 (reuses a control plane name)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
CoderMCPServer Kind E2E follow-upsCó thể đã có người làm @ThomasK33 đã nhận 5 ngày trước. Đang mở
coder/coder-k8s#390 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CoderMCPServer delete and RBAC test follow-upsCó thể đã có người làm @ThomasK33 đã nhận 5 ngày trước. Đang mở
coder/coder-k8s#378 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Ownership proof for Coder IDs recorded in controller status (D11 B)Có thể đã có người làm @ThomasK33 đã nhận 6 ngày trước. Đang mở
coder/coder-k8s#372 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của coder/coder-k8s
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
devlikeapro/waha#2322 ·
Maintainer thường phản hồi trong vòng 2 ngày