Skip to content

Commit 089b1d6

Browse files
authored
Merge pull request #50 from dakraus/docs/add-missing-rbac-rule
📖 docs: add missing RBAC bindings / rules
2 parents 219eae6 + ea34639 commit 089b1d6

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

Diff for: docs/getting-started.md

+25-1
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ the RBAC rules that grant the Agent access.
151151

152152
The Sync Agent needs to
153153

154+
* access the workspace of its `APIExport`,
155+
* get the `LogicalCluster`,
154156
* manage its `APIExport`,
155157
* manage `APIResourceSchemas` and
156158
* access the virtual workspace for its `APIExport`.
@@ -163,6 +165,15 @@ kind: ClusterRole
163165
metadata:
164166
name: api-syncagent-mango
165167
rules:
168+
# get the LogicalCluster
169+
- apiGroups:
170+
- core.kcp.io
171+
resources:
172+
- logicalclusters
173+
resourceNames:
174+
- cluster
175+
verbs:
176+
- get
166177
# manage its APIExport
167178
- apiGroups:
168179
- apis.kcp.io
@@ -200,14 +211,27 @@ rules:
200211
apiVersion: rbac.authorization.k8s.io/v1
201212
kind: ClusterRoleBinding
202213
metadata:
203-
name: api-syncagent-columbo:mango-system
214+
name: api-syncagent-mango:system
204215
roleRef:
205216
apiGroup: rbac.authorization.k8s.io
206217
kind: ClusterRole
207218
name: api-syncagent-mango
208219
subjects:
209220
- kind: User
210221
name: api-syncagent-mango
222+
223+
---
224+
apiVersion: rbac.authorization.k8s.io/v1
225+
kind: ClusterRoleBinding
226+
metadata:
227+
name: api-syncagent-mango:access
228+
roleRef:
229+
apiGroup: rbac.authorization.k8s.io
230+
kind: ClusterRole
231+
name: system:kcp:workspace:access
232+
subjects:
233+
- kind: User
234+
name: api-syncagent-mango
211235
```
212236

213237
## Publish Resources

0 commit comments

Comments
 (0)