Skip to content

Commit 27f9533

Browse files
committed
added docs into developers/architecture.md
1 parent 5d08fa1 commit 27f9533

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

docs/content/developers/architecture.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,41 @@ Running with 2 consumers validates:
278278
- For cluster-scoped resources with IsolationPrefixed, resources are name-prefixed
279279
- For cluster-scoped resources with IsolationNamespaced, provider CRD is toggled to NamespaceScoped
280280

281+
## RBAC Infrastructure
282+
283+
### Exported resources
284+
285+
Exported resources always use cluster-scoped RBACs:
286+
287+
- Aggregating `kube-binder-exports` ClusterRole
288+
- Bound with `kube-binder-exports` ClusterRoleBinding to `<APIServiceExport.Namespace>/kube-binder` ServiceAccount
289+
290+
This aggregating ClusterRole includes all subsequent ClusterRoles that are created for each APIServiceExport.
291+
292+
- `kube-binder-<APIServiceExport.Namespace>-<APIServiceExport.Name>` ClusterRole for each APIServiceExport
293+
- Each resource in the APIServiceExport is granted `"get", "list", "watch", "create", "update", "patch", "delete"` set of verbs.
294+
- Aggregates into `kube-binder-exports` ClusterRole.
295+
296+
### Claimed resources
297+
298+
Claimed resources use namespace- or cluster-scoped RBACs depending on the resource scope of the claimed resource itself, as well as backend's informer scope.
299+
300+
For cluster-scoped informers:
301+
302+
**Scope of the claimed resource** | **Informer scope** | **What happens**
303+
--- | --- | ---
304+
cluster | cluster | Creates ClusterRole & ClusterRoleBinding
305+
namespace | cluster | Creates ClusterRole & ClusterRoleBinding
306+
307+
For namespace-scoped informers:
308+
309+
**Scope of the claimed resource** | **Informer scope** | **What happens**
310+
--- | --- | ---
311+
cluster | namespace | Creates ClusterRole & ClusterRoleBinding
312+
namespace | namespace | Creates Role & RoleBinding
313+
314+
Regardless of the configuration, claimed resources are granted `"get", "list", "watch", "create", "update", "patch", "delete"` set of verbs.
315+
281316
## Implementation Details
282317

283318
### Code Structure

0 commit comments

Comments
 (0)