Document the default RBAC role the Helm chart creates
What does this MR do?
- Documents that
rbac.create: truegives the runner service account all verbs on all resources in the core API group whenrbac.rulesis empty. - Adds a short topic, "Limit the permissions the chart grants", that explains how
rbac.ruleschanges the role. - Links to it from the
rbacrequirement on the install page.
The change adds 18 lines to two pages. It changes no chart behavior.
Why
The install page says operators must set rbac: { create: true }. With rbac.rules empty, which is the default, the chart renders this role:
rules:
- apiGroups: [""]
resources: ["*"]
verbs: ["*"]That role is wider than the permissions the runner needs, which the Kubernetes executor page lists. A namespace administrator who is not a cluster administrator cannot install the chart with it, because Kubernetes rejects a role that grants more than its creator holds (gitlab-org/charts/gitlab-runner#38 (moved)). No runner page says the default is a wildcard or that rbac.rules narrows it.
flowchart TD
A["rbac.create: true"] --> B{"rbac.rules empty?"}
B -->|"yes, the default"| C["Role: core API group, all resources, all verbs"]
B -->|"no"| D["Role: only the listed rules"]
D --> E["A rule that omits resources or verbs, or leaves either empty, gets *"]How it was checked
Checked with helm template on chart v0.93.0:
- Default values render the all-access rule above.
- One rule with
resourcesandverbsreplaces it. - A rule with no
verbs, or withverbs: [], rendersverbs: ["*"]. rbac.clusterWideAccess: truerenders aClusterRole.templates/role.yamlis identical at v0.93.0 and onmain.
Related issues
- Related to gitlab-org/charts/gitlab-runner#172. This change documents the current default and does not change it.
Author's checklist
- Optional. Consider taking the GitLab Technical Writing Fundamentals course.
- Follow the:
- If you're adding or changing the main heading of the page (H1), ensure that the product availability details are added.
- If you are a GitLab team member, request a review based on:
- The documentation page's metadata.
- The associated Technical Writer.
If you are a GitLab team member and only adding documentation, do not add any of the following labels:
~"frontend"~"backend"~"type::bug"~"database"
These labels cause the MR to be added to code verification QA issues.
Reviewer's checklist
Documentation-related MRs should be reviewed by a Technical Writer for a non-blocking review, based on Documentation Guidelines and the Style Guide.
If you aren't sure which tech writer to ask, use roulette or ask in the #docs Slack channel.
- If the content requires it, ensure the information is reviewed by a subject matter expert.
- Technical writer review items:
- Ensure docs metadata is present and up-to-date.
- Ensure the appropriate labels are added to this MR.
- Ensure a release milestone is set.
- If relevant to this MR, ensure content topic type principles are in use, including:
- The headings should be something you'd do a Google search for. Instead of
Default behavior, say something likeDefault behavior when you close an issue. - The headings (other than the page title) should be active. Instead of
Configuring GDK, say something likeConfigure GDK. - Any task steps should be written as a numbered list.
- If the content still needs to be edited for topic types, you can create a follow-up issue with the docs-technical-debt label.
- The headings should be something you'd do a Google search for. Instead of
- Review by assigned maintainer, who can always request/require the above reviews. Maintainer's review can occur before or after a technical writer review.
AI disclosure
An AI coding assistant wrote this change. The assistant also checked each claim against the chart templates and values.yaml at chart v0.93.0, ran each described behavior with helm template on that chart, and ran Vale and markdownlint-cli2 with this project's configuration on the changed pages on a local workstation.