Fix per-namespace RBAC collisions across Argo CD instances and controllers
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go, kubernetes
- Lĩnh vực
- authorization, backend
Hướng nghiên cứu
Read argocd-operator/controllers/argocd/image_updater.go, role.go, and rolebinding.go, then trace source namespace cleanup and ApplicationSet reconciliation. Map how Image Updater and application source namespace RBAC create, reconcile, and remove overlapping resources. Done means the listed collision, upgrade, interruption, and cleanup scenarios are covered by tests while preserving active permissions and removing confirmed stale grants.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Per-namespace RBAC resources for Image Updater can collide with resources managed by another Argo CD instance or by application source namespace reconciliation. These collisions can cause controllers to overwrite each other's RBAC state or remove permissions that are still needed.
Scenarios
- Same-named Argo CD instances: Two instances in different namespaces watch the same target namespace and use the same per-namespace Role and RoleBinding names. After a failed or interrupted reconciliation, a Role can carry instance A's owner label while its RoleBinding grants access to instance B. When A prunes the namespace, it can delete the Role and remove B's manager permissions.
- Role collision with applications in any namespace: Image Updater calls
newRoleForApplicationSourceNamespaces, which is also used for application source namespace RBAC. When the scopes overlap, Image Updater and the application controller can reconcile the same Role with different rules. - RoleBinding collision with applications in any namespace: Image Updater calls
newRoleBindingForSupportNamespaces, which is also used for application source namespace RBAC. When the scopes overlap, Image Updater and the application controller can reconcile the same RoleBinding with different subjects or Role references.
Required work
Provide a general solution that isolates per-namespace RBAC by component and Argo CD instance. Consider distinct resource names that include the component and instance namespace. Alternatively, evaluate Image Updater-specific ownership marks and changes to application and ApplicationSet reconciliation, including how they avoid same-name Kubernetes object collisions.
Handle existing shared resources during upgrade. Preserve active permissions while migrating, and remove stale grants without deleting resources still needed by another instance or component.
Affected areas include argocd-operator/controllers/argocd/image_updater.go, argocd-operator/controllers/argocd/role.go, argocd-operator/controllers/argocd/rolebinding.go, and source namespace cleanup.
Acceptance criteria
- Same-named instances can reconcile and prune overlapping target namespaces without overwriting or removing each other's required RBAC.
- Image Updater and application source namespace RBAC can coexist without conflicting Role rules or RoleBinding subjects and references. Check ApplicationSet reconciliation as well.
- Cleanup preserves Roles referenced by another instance's active RoleBinding and still removes confirmed stale orphaned resources.
- Upgrade and interrupted-reconciliation paths preserve needed access and do not leave stale grants.
- Tests cover the three scenarios, overlapping scopes, upgrade, interruption, and cleanup.
Requested by @dkarpele.
PR: https://github.com/redhat-developer/gitops-operator/pull/1511
Review finding: https://github.com/redhat-developer/gitops-operator/pull/1511#discussion_r4517295806
Related review comment: https://github.com/redhat-developer/gitops-operator/pull/1511#discussion_r4509278543
- Ngôn ngữ chính
- Go
- Star
- 190
- Fork
- 367
- Merge trung bình
- 4 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 63
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- 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 redhat-developer/gitops-operator
-
Manager does not detect Route CRD that appears after startupCó thể đã có người làm @atishay-kasliwal đã nhận hôm nay. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
redhat-developer/gitops-operator#1566 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
NamespaceManagement revocation checks labels on the wrong namespaceCó thể đã có người làm @Rizwana777 đã nhận 3 ngày trước. Đang mởkind/bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
redhat-developer/gitops-operator#1559 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Deleting an ArgoCD instance removes RBAC belonging to same-named instancesCó thể đã có người làm @Rizwana777 đã nhận 3 ngày trước. Đang mởkind/bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
redhat-developer/gitops-operator#1558 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
NamespaceManagement cleanup can delete RBAC in unrelated namespacesCó thể đã có người làm @Rizwana777 đã nhận 3 ngày trước. Đang mởkind/bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
redhat-developer/gitops-operator#1557 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ApplicationSet tokenRef strict mode changes only apply after the controller is restartedCó thể đã có người làm @Gabrielandre02 đã nhận 5 ngày trước. Đang mở
redhat-developer/gitops-operator#1554 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của redhat-developer/gitops-operator
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ 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 1 ngày
-
Inconsistency between golang and cue in specCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Tencent/LoopForge#1087 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày