Fix per-namespace RBAC collisions across Argo CD instances and controllers
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- go, kubernetes
- Domaine
- authorization, backend
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- Go
- Étoiles
- 190
- Forks
- 367
- Merge moyen
- 4 j 2 h
- PR mergées (30 j)
- 63
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de redhat-developer/gitops-operator
-
Manager does not detect Route CRD that appears after startupPeut-être pris @atishay-kasliwal l’a pris aujourd’hui. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
redhat-developer/gitops-operator#1566 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
NamespaceManagement revocation checks labels on the wrong namespacePeut-être pris @Rizwana777 l’a pris il y a 3 jours. Ouvertekind/bug
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
redhat-developer/gitops-operator#1559 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Deleting an ArgoCD instance removes RBAC belonging to same-named instancesPeut-être pris @Rizwana777 l’a pris il y a 3 jours. Ouvertekind/bug
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
redhat-developer/gitops-operator#1558 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
NamespaceManagement cleanup can delete RBAC in unrelated namespacesPeut-être pris @Rizwana777 l’a pris il y a 3 jours. Ouvertekind/bug
Difficulté 4/5 3-5 jours Accessibilité débutants 22/100
redhat-developer/gitops-operator#1557 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
ApplicationSet tokenRef strict mode changes only apply after the controller is restartedPeut-être pris @Gabrielandre02 l’a pris il y a 5 jours. Ouverte
redhat-developer/gitops-operator#1554 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de redhat-developer/gitops-operator
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
mozilla-ai/cq#601 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour