Commit 783cb84
authored
feat(rbac): bind makeitworkcloud:admins GitHub team to cluster-admin (#22)
## Summary
When Headlamp authenticates a user via Dex, the resulting ID token is
forwarded to kube-apiserver. With the apiserver's \`--oidc-issuer-url\`
/ \`--oidc-client-id=headlamp\` / \`--oidc-username-claim=email\` /
\`--oidc-groups-claim=groups\` flags (added to k3s cloud-init in the
matching tfroot-libvirt PR), the apiserver validates the token and
surfaces the user as e.g. \`steven@makeitwork.cloud\` with groups like
\`makeitworkcloud:admins\`. Without an RBAC binding the user is
recognized but not authorized → 401 from the apiserver, which Headlamp
interprets as a failed login and re-prompts.
This adds a single ClusterRoleBinding mapping the GitHub team
\`makeitworkcloud:admins\` to cluster-admin. Anyone in that team gets
full kubectl/Headlamp access; non-members get the standard denied
response.
## Pairs with
- tfroot-libvirt PR (incoming): adds \`--oidc-*\` apiserver args to k3s
cloud-init.
## Test plan
- [x] Already validated on the live cluster — the same binding was
applied manually after restarting k3s with the OIDC apiserver flags, and
Headlamp login completed (no more 401 loop).
- [x] After merge: \`kubectl get clusterrolebinding
oidc-makeitworkcloud-admins\` exists and is owned by ArgoCD.
🤖 Generated with [Claude Code](https://claude.com/claude-code)1 parent 1fa5186 commit 783cb84
2 files changed
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments