Deleting an ArgoCD instance removes RBAC belonging to same-named instances
维护者通常 1 天内回复
@Rizwana777 已经在做这个了。
开始于 2026年11月16日。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- go, kubernetes
调研方向
Start in argocd-operator/controllers/argocd/util.go, at deleteClusterResources (around line 755) and argocdInstanceSelector (around line 849), then follow the deletion path called from argocd_controller.go around line 264. Reproduce with a fake-client test that runs Reconcile on two same-named ArgoCD CRs in different namespaces. Done when deleting the tenant CR removes only its own ClusterRoles, ClusterRoleBindings and RoleBindings, and the victim's RBAC survives. Check that the owner match includes namespace, and ideally UID, before settling on the approach.
由索引模型根据 Issue 内容生成。
描述
With a cluster-wide operator installation, a user who can create and delete ArgoCD CRs in their own namespace can cause the operator to delete another instance's RBAC by reusing its CR name. No permissions in the victim namespace are required.
Reproduction
- Have an existing cluster-scoped ArgoCD instance named
shared-namein namespacevictim. - Create another ArgoCD CR named
shared-namein an unrelated namespace,tenant. - Wait for the operator to add its deletion finalizer, then delete the tenant CR.
Actual behavior
deleteClusterResources selects resources using only app.kubernetes.io/managed-by=<CR name>, without checking the owning namespace. Cleanup deletes matching ClusterRoles, ClusterRoleBindings, and RoleBindings belonging to the victim instance, disrupting its operation. Repeating the creation/deletion cycle can repeatedly remove the victim's RBAC.
Relevant code: argocd-operator/controllers/argocd/util.go, particularly deleteClusterResources at line 755 and argocdInstanceSelector at line 849. The deletion reconciliation path calls this cleanup from argocd_controller.go:264.
Expected behavior
Deleting an ArgoCD instance should remove only resources owned by that instance. Cleanup should verify the complete owning CR identity, including namespace and preferably UID. Add regression coverage with same-named instances in different namespaces, ensuring deletion removes the tenant's resources while preserving the victim's.
Confirmed at commit 5fb7a030 using an isolated fake-client reproduction through Reconcile; no live-cluster exploit was run.
(Bug text c/o OpenAI Codex v6.1 Sol xhigh)
- 主要语言
- Go
- 星标
- 190
- 派生
- 367
- 平均合并
- 4 天 2 小时
- 30 天内合并 PR
- 63
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
redhat-developer/gitops-operator 的其他 Issue
-
Manager does not detect Route CRD that appears after startup可能已有人在做 @atishay-kasliwal 今天认领。 未关闭
难度 4/5 3-5 天 新手友好度 48/100
redhat-developer/gitops-operator#1566 · 1 条评论 ·
维护者通常 1 天内回复
-
NamespaceManagement revocation checks labels on the wrong namespace可能已有人在做 @Rizwana777 于 3 天前认领。 未关闭kind/bug
难度 4/5 3-5 天 新手友好度 25/100
redhat-developer/gitops-operator#1559 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
NamespaceManagement cleanup can delete RBAC in unrelated namespaces可能已有人在做 @Rizwana777 于 3 天前认领。 未关闭kind/bug
难度 4/5 3-5 天 新手友好度 22/100
redhat-developer/gitops-operator#1557 · 已指派 1 人 ·
维护者通常 1 天内回复
-
ApplicationSet tokenRef strict mode changes only apply after the controller is restarted可能已有人在做 @Gabrielandre02 于 5 天前认领。 未关闭
redhat-developer/gitops-operator#1554 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Enqueue the previous Argo CD instance when NamespaceManagement consent is withdrawn可能已有人在做 @Gabrielandre02 于 5 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 25/100
redhat-developer/gitops-operator#1530 · 1 条评论 ·
维护者通常 1 天内回复
查看 redhat-developer/gitops-operator 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
Inconsistency between golang and cue in spec可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
security
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 73/100
Tencent/LoopForge#1087 · 1 条评论 ·
维护者通常 1 天内回复