Skip to content

Commit fafde3e

Browse files
authored
docs(kubernetes): add RBAC section to setup page (#1540)
Documents the ServiceAccount, Role, and ClusterRole created by the Helm chart inline on the setup page, per reviewer feedback on #1250. Reflects the current chart templates including pods/get for sandbox identity and tokenreviews/create for projected token validation. Closes #1018
1 parent ee637e1 commit fafde3e

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

docs/kubernetes/setup.mdx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,45 @@ helm upgrade --install openshell \
152152
--values my-values.yaml
153153
```
154154

155+
## RBAC
156+
157+
The chart creates the following RBAC resources in the release namespace:
158+
159+
| Resource | Scope | Name |
160+
|---|---|---|
161+
| ServiceAccount | Namespace | `openshell` |
162+
| ServiceAccount | Namespace | `openshell-sandbox` (for sandbox pods) |
163+
| Role + RoleBinding | Namespace | `openshell-sandbox` |
164+
| ClusterRole + ClusterRoleBinding | Cluster | `openshell-node-reader` |
165+
166+
The namespaced Role covers sandbox lifecycle and identity:
167+
168+
| API Group | Resource | Verbs |
169+
|---|---|---|
170+
| `agents.x-k8s.io` | `sandboxes`, `sandboxes/status` | create, delete, get, list, patch, update, watch |
171+
| `""` | `events` | get, list, watch |
172+
| `""` | `pods` | get |
173+
174+
The ClusterRole grants node inspection and token validation:
175+
176+
| API Group | Resource | Verbs |
177+
|---|---|---|
178+
| `authentication.k8s.io` | `tokenreviews` | create |
179+
| `""` | `nodes` | get, list, watch |
180+
181+
To use an existing ServiceAccount instead of creating one, set `serviceAccount.create=false` and supply its name:
182+
183+
```shell
184+
helm upgrade --install openshell \
185+
oci://ghcr.io/nvidia/openshell/helm-chart \
186+
--version <version> \
187+
--namespace openshell \
188+
--set serviceAccount.create=false \
189+
--set serviceAccount.name=my-existing-sa
190+
```
191+
192+
The ServiceAccount must already have the Role and ClusterRole bindings described above.
193+
155194
## Next Steps
156195

157196
- To enable automatic certificate rotation with cert-manager, refer to [Managing Certificates](/kubernetes/managing-certificates).

0 commit comments

Comments
 (0)